Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Datalist control-hyperlink problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mister-Ed - 19 Sep 2007 19:54 GMT
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-results1.aspx?county=Clark&subcat...

a subcat link that i just added, but doesnt work; url generated for
non-working link:
http://www.lasvegasunions.info/prov-results1.aspx?county=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&uregion=lv">Auctions</a>
...the link that works has spaces/+ signs in it, but I am stripping
spaces with Server.UrlEncode (?????)

TIA
mr. ed
mister-Ed - 19 Sep 2007 21:00 GMT
..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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.