Click here to Skip to main content
12,821,084 members (41,447 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
while executing the code below, it is adding my link to site url like...


where is the problem plzz tell me.
if (dr.Read())
     dvurl.InnerHtml = "My Url Link is :- <a target='_blank' href= "+ ResolveClientUrl(Convert.ToString(dr["mem_url"])) + " >"+Convert.ToString(dr["mem_url"]) +"</a>";

Can someone tell me where I did mistake
Posted 20-Nov-12 20:00pm
Updated 21-Nov-12 3:00am
Krunal R 21-Nov-12 1:30am
Could you please update your question , like omit all the comments and again paste you code
Krunal R 21-Nov-12 1:49am
What it is displaying ??
Miss Maheshwari 21-Nov-12 1:58am
on clicking of hyperlink it is showing this url http://localhost:4434/DharmikSamajik/member/
Krunal R 21-Nov-12 2:00am
So what do you want ?
Miss Maheshwari 21-Nov-12 2:15am
it should display only
not this
sinhasourabh 21-Nov-12 8:21am
What is dvURL ? is it simple HTML HyperLink or ASP.NET HYPERLINK?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The first thing you need to do is look at the HTML that that is generating: use your browsers "View source" (or "Inspect Element" if it has one - Chrome does)

Once you have that, break it down into the various parts, and match them against the code above - which parts are the output form which bits?

I suspect that your datareader is not returning exactly what you expect it to.
Miss Maheshwari 21-Nov-12 6:20am
my dataset is returning

and i place it on div with <a href=dr[myurl]>
but on clicking this it is opening the page like


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170308.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100