Help with HtmlTextWriter

L

larryvan

I have been beating my head against a wall for two days now. I need to
output a hyperlink using htmltextwriter.write that looks like this:

<a href='manageforums.aspx?CID=<%=Request.QueryString("CID")%>'>

When I run the app and click on the link it looks like this:

http://mycomputer/xmlnodes/manageforums.aspx?CID=<%=Request.QueryString("CID")%>

If I view the source in notepad the syntax for the link is correct.
Furthermore, I can save that page with a .aspx extension and load it
into the browser and the link works correctly.

Any ideas? This seems like something developers would want to do quite
often.
 
L

Larry Van

Grant,

Thanks for replying. What I am trying to do is use the htmltextwriter
to output the line. I am reading in an xml file and parsing it for
output to an aspx page.

Here is the line of code:

htmltextwriter.writer(("'<a
href=my.aspx?CID=<%=request.querystring(&quot;CID&quot;)%>'>my
link</a>")

As I mentioned above, when I run the web app the link shows
http://mycomputer/xmlnodes/manageforums.aspx?CID=<%=Request.QueryString("CID")%>
(mycomputer is a fictious url)

If I view source with notepad and save it as an aspx page the link
works properly.

Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top