.net - GridView Column -


i have gridview bound table, added 1 hyperlink field can see code below:

<asp:hyperlinkfield navigateurl="~/logout.aspx?category=mobile&&id=" text ="logout"/> 

as can see sending 2 query string url. getting both correctly long sending static data. problem want send 1 of gridview column value through query string want , tried:

<asp:hyperlinkfield navigateurl="~/logout.aspx?category=mobile&&id='<%gridview1.selectedrow.cells(1).text.tostring%>'" text ="logout"/> 

i not getting id value per column value same gridview code

gridview1.selectedrow.cells(1).text.tostring 

how should correct syntax can send column value through url?

thanks...

you'll have convert field template field , bind asp:hyperlink's navigateurl property in databound event of gridview.

examples can found here (using bulletedlist instead of hyperlink):
http://msdn.microsoft.com/en-us/library/aa479353.aspx


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -