Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datalist control-hyperlink problem

Thread Tools

Datalist control-hyperlink problem

Posts: n/a
I am displaying subcategories in my datalist, and now I have a
bizarre thing happen when I add a new subcategory record in my sql
database, the new subcategory link does not click into the next page.
When clicking the link, nothing happens!:

code to link w/querystrings formatted:
<a href="prov-results1.aspx?county=<
%#Server.UrlEncode(Request.QueryString("county")) & "&subcat=" &
Server.UrlEncode((Eval("SubCategory").ToString())) & "&category=" &
Server.UrlEncode((Eval("Category").ToString())) & "&uregion=" &
Server.UrlEncode((Eval("uregion").ToString()))%>"> <%#

url generated for working link:

a subcat link that i just added, but doesnt work; url generated for
non-working link:

when view sourcing in browser, this link works:
<a href="prov-results1.aspx?
county=Clark&subcat=Maintenance&category=Autos++++ ++++++++++++++++++++

view sourcing in browser, this link does not work:
<a href="prov-results1.aspx?
county=Clark&subcat=Auctions&category=Autos&uregio n=lv">Auctions</a>
....the link that works has spaces/+ signs in it, but I am stripping
spaces with Server.UrlEncode (?????)

mr. ed

Reply With Quote
Posts: n/a

...tried using the hyperlink/navigateurl method. This produced error
"server tag not well


<asp:HyperLink id="HyperLink1" runat="server"

%#Server.UrlEncode(Request.QueryString("county")) &

"&subcat=" & Server.UrlEncode((Eval("SubCategory").ToString())) &
"&category=" &

Server.UrlEncode((Eval("Category").ToString())) & "&uregion=" &

Server.UrlEncode((Eval("uregion").ToString()))%>"> <%#

.... I absolutely need these querystrings in this link.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with DataList within DataList Will ASP .Net Web Controls 4 10-18-2007 03:19 AM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd ASP .Net 1 05-26-2004 04:07 AM
DataList in DataList acko bogicevic ASP .Net 2 11-11-2003 08:31 AM
Datalist in Datalist How? Gönen EREN ASP .Net 0 08-22-2003 02:41 PM