ASP.NET - placing code in a string and calling it....

Asked By Rosie Buchanan on 17-Nov-11 06:49 PM
How can I place this in a string in my aspx.vb page and call it?

I want to place this in a string:

'<a href=areaDistListing.aspx?reg='+ reg + '&Area=' + Area + '>' +'Area ' + right(area,1) as doc

 

Then how would I call this in the aspx.vb page here?


ElseIf


doc.Text = name of my string Then

This way I won't have to worry about the " and if I'm missing something.

 
Thanks.

Kirtan Patel replied to Rosie Buchanan on 17-Nov-11 07:49 PM
Dim str = String.format("<a href=areaDistListing.aspx?reg={0}&Area={1}>Area",Reg,Area) & right(area,1) as doc
Rosie Buchanan replied to Kirtan Patel on 18-Nov-11 09:26 AM
Thanks this worked!

ElseIf doc.Text = str Then