![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When I insert the complete querystring into the NavigateUrl tag this hyperlink works fine within the GridView. asp:HyperLinkField HeaderText=" Details" NavigateUrl="~/Admindetail.aspx?ku_id=1" Text="Details" If I try to let the parameter data be provided dynamically something strange happen. I can see that the dynamical data is provided, with the right ku_id, but the aspx file is removed from the URL asp:HyperLinkField DataNavigateUrlFields="ku_id" HeaderText="Details" NavigateUrl="~/Admindetail.aspx?ku_id={0}" Text="Details" / The first code gives something like www.mysite.com/Admindetail.aspx?ku_id=1 this works OK The second code gives something like www.mysite.com/1 Am I configuring it incorrect? TIRislaa |
#3
| |||
| |||
|
|
Tor, the NavigateURL is only used when specifying the same link for all rows. Text attribute is also static accreoss the board. If you want the link to include a value from a data field you should use the DataNavigateURLField with the DataNavigateURLFormatString. The same goes for DataTextField and DataTextFormatString if you want the link text to also be dynamic. Your tag should look something like this asp:HyperLinkColumn HeaderText="View Detail" DataNavigateUrlField="ku_id" DataNavigateUrlFormatString="~/Admindetail.aspx?ku_id={0}" DataTextField="ku_id" DataTextFormatString="Details for Record {0}" / Good luck, -- Mohamad Elarabi Lead Developer. MCTS, MCPD. "Tor Inge Rislaa" wrote: When I insert the complete querystring into the NavigateUrl tag this hyperlink works fine within the GridView. asp:HyperLinkField HeaderText=" Details" NavigateUrl="~/Admindetail.aspx?ku_id=1" Text="Details" If I try to let the parameter data be provided dynamically something strange happen. I can see that the dynamical data is provided, with the right ku_id, but the aspx file is removed from the URL asp:HyperLinkField DataNavigateUrlFields="ku_id" HeaderText="Details" NavigateUrl="~/Admindetail.aspx?ku_id={0}" Text="Details" / The first code gives something like www.mysite.com/Admindetail.aspx?ku_id=1 this works OK The second code gives something like www.mysite.com/1 Am I configuring it incorrect? TIRislaa |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |