Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

ASPX code:

using Rad grid

<radg:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Zip Code Count" DataField="ZipCount" >

   <ItemTemplate>

     <asp:LinkButton runat="server" ID="lnkZipCount" Text='<%#Eval("ZipCount") %>' CommandArgument='<%#Eval("CityID") + ";" +Eval("Sname")%>' OnClick="lnkZipCount_Click"></asp:LinkButton>

   </ItemTemplate>

 </radg:GridTemplateColumn>

 

Cs code

protected void lnkFunctionalGroup_Click(object sender, EventArgs e)

    {

        LinkButton lnkPortal = (LinkButton)sender;

        string info = lnkPortal.CommandArgument;

        string[] arg=new string[2];

        char[] splitter= {';'};

        arg = info.Split(splitter);

        Session["FunctionalGroupId"] = arg[0];

        Session["FunctionalGroupName"] = arg[1];

        Response.Redirect("PortalGroup.aspx");

    }

Posted on Thursday, April 3, 2008 6:59 PM Vini | Back to top


Comments on this post: Passing Multiple value in Command Argument

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks a lottttttttttttttt!
it really works.and very easy too.
Left by swati on May 14, 2008 9:30 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
thanks to code .
Left by thiago on Nov 10, 2008 2:43 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
didn't work for me.
Left by chanchal on Feb 06, 2009 4:02 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks, thanks, thanks
Left by Sara on Feb 17, 2009 2:02 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks!!! Exactly what I was after.

Good example of how to use it.
Left by Anon on Sep 15, 2009 4:56 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks!! Good Example
Left by The Great on Feb 04, 2010 11:12 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Good man.
Left by Joe on May 07, 2010 3:02 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Simplifyed the code:
var arguments = (string) e.CommandArgument;
var arg =arguments.Split(new[] { ';' });
Session["FunctionalGroupId"] = arg[0];
Session["FunctionalGroupName"] = arg[1];
Response.Redirect("PortalGroup.aspx");
Left by pkdev on May 18, 2010 8:30 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks man! That was just what I was looking for :D
Left by Myself on Jul 07, 2010 11:35 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
thanks,
this is working...
Left by rajat on Aug 09, 2010 6:01 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks man! This is just I was searching...
Left by Rahul on Jun 01, 2011 3:06 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
it's so beautiful.
Left by paladin on Jun 29, 2011 1:42 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
thanks for Sharing it worked for me!!!!!!!!!
Left by Ganesh on Jul 29, 2011 11:36 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks its Helpful....
Left by Rahul on Aug 31, 2011 10:49 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thank you! This is exactly what I needed. Very helpful!
Left by Elizabeth on Oct 17, 2011 1:02 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanks man..........
Left by Jay on Aug 19, 2012 10:14 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thanx ...thats working for me.Thank You
Left by sona dhinoja on Feb 10, 2013 2:31 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thank you, It is what I am searching for, it is working perfectly.
Left by Nag on Feb 22, 2013 4:40 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thank you
Left by Prasanthi on May 09, 2013 9:08 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
thank :)
Left by pm on Sep 17, 2014 8:48 PM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Thank you very much, I used it this way Text='<%# "Weekly Highlight Report - Wk " + DataBinder.Eval(Container.DataItem, "IWEEK") + " (" + DataBinder.Eval(Container.DataItem, "DATEFROM") + " TO " + DataBinder.Eval(Container.DataItem, "DATETO") + " )" %>' />

and it worked for me.

Thank you, thank you, thank you.
Left by Isaac Bejide on Nov 12, 2015 2:34 AM

# re: Passing Multiple value in Command Argument
Requesting Gravatar...
Not Working Show Msg Blow :-
Error 75 Preprocessor directives must appear as the first non-whitespace character on a line D:\saleem\Final\HautTemplate\Default.aspx 207
Left by saleem on Sep 22, 2016 5:36 PM

Your comment:
 (will show your gravatar)


Copyright © Gaurav Taneja | Powered by: GeeksWithBlogs.net