Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink Field with GridView

Status
Not open for further replies.

faust13

Programmer
Aug 7, 2001
176
US
I am trying to have a Hyperlink field point to a custom edit page. How do I programmatically add the current row's ID to the querystring?


Thanks,

faust13
Because Han Shoots First
 
Yes, with a Gridview. Here's what I have:

<asp:HyperLinkField HeaderText="Actions" NavigateUrl="edit_unit.aspx?unit_id="
Text="View/Edit" />

I want to programmatically set the unit ID.


Thanks,

faust13
Because Han Shoots First
 
My last post tells you how to do what you want


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Here's the answer:

<asp:HyperLinkField DataNavigateUrlFields="unit_id" HeaderText="Actions" DataNavigateUrlFormatString="edit_unit.aspx?unit_id={0}"
Text="View/Edit" />


Thanks,

faust13
Because Han Shoots First
 
You're welcome


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top