Getting the selected value in hyperlink

  • 12 years ago


     I want to pass the selectedvalue from gridview in hyperlink using the following code in the gridview row_databound event


    e.Row.Cells(1).Text = "<a href='BLOCKED SCRIPTscandet(""" & usercode & """,""" & df& """,""" & dftype& """,""" & dfdate& """)'>" & e.Row.Cells(1).Text & "</a>"


    But the usercode i hv mentioned here is the selected cell value from the gridview

    How can i get the selected row value of the gridview to pass it to hyperlink

     Help me to solve this issue





  • 12 years ago

     Try  it with  Gridview Template ...


    which is most  easy way  to solve this  problem



    <td><a ***ur current  code ***> u r cell value  if ur  using dataset then <%#Eval("columnname")%> </a></td> 

    </itemtemplate >

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We better hurry up and start coding, there are going to be a lot of bugs to fix.”