![]() |
GridView Hyperlink Field Append URL?
I'm trying to create a link in my gridview that will include th
existing url parameters plus the ID of the field. I've trie everything I can think of to get it to work but this was my lates attempt below. I'm new to using asp.net and I'm just used t building my own url's in php and this is just so different the wa they go about it. I've tried about 5 different processes <asp:HyperLinkField DataNavigateUrlFields="WONo DataNavigateUrlFormatString="Detail.aspx?StartDate =<% Request.QueryString("StartDate" %>&EndDate=<% Request.QueryString("EndDate" %>&WO={0}"DataTextField="WONo / --------------------------------- http://community.ihostasp.ne ASP.NET Developer Community |
Re: GridView Hyperlink Field Append URL?
You can try TemplateField instead:
.... <Columns> <asp:TemplateField> <ItemTemplate> <a href='<%# "default.aspx?StartDate=" + Request.QueryString["StartDate"] + "&EndDate=" + Request.QueryString["EndDate"] + "&wo=" + DataBinder.Eval(Container.DataItem, "WONo") %>'> <%# DataBinder.Eval(Container.DataItem, "WONo") %> </a> </ItemTemplate> </asp:TemplateField> .... </Columns> "barkster" <barclay@fusionxstudio-dot-com.no-spam.invalid> wrote in message news:xu6dnVAhCaVR7bDYnZ2dnUVZ_v6dnZ2d@giganews.com ... I'm trying to create a link in my gridview that will include the existing url parameters plus the ID of the field. I've tried everything I can think of to get it to work but this was my latest attempt below. I'm new to using asp.net and I'm just used to building my own url's in php and this is just so different the way they go about it. I've tried about 5 different processes. <asp:HyperLinkField DataNavigateUrlFields="WONo" DataNavigateUrlFormatString="Detail.aspx?StartDate =<%# Request.QueryString("StartDate") %>&EndDate=<%# Request.QueryString("EndDate") %>&WO={0}"DataTextField="WONo" /> ---------------------------------- http://community.ihostasp.net ASP.NET Developer Community |
| All times are GMT. The time now is 12:14 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.