Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Datalist control-hyperlink problem

 
 
mister-Ed
Guest
Posts: n/a
 
      09-19-2007
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()))%>"> <%#
Eval("SubCategory")%></a>


url generated for working link:
http://www.lasvegasunions.info/prov-...y=Clark&subcat...


a subcat link that i just added, but doesnt work; url generated for
non-working link:
http://www.lasvegasunions.info/prov-...y=Clark&subcat...


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


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 (?????)


TIA
mr. ed

 
Reply With Quote
 
 
 
 
mister-Ed
Guest
Posts: n/a
 
      09-19-2007


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

formed"

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

NavigateUrl="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()))%>"> <%#
Eval("SubCategory")%></asp:HyperLink>

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

Ed

 
Reply With Quote
 
 
 
Reply

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



Advertisments