Microsoft
Software
Hardware
Network
Question : ASP.net 3.5 Using VB.net function to generate HTLM code on aspx page
I would like to use a VB.net function to generate html code on an aspx page. In the past I have used a vbscript function to generate asp code in classic asp. I like this approach because it allows me to generate standard blocks of code based on parameters, e.g. Page Headers. This was easy in classic asp but seems to be hard in asp.net.
Here's what I have done. Unfortunately it does not work.
1. I created a VBnet function in a Class to generate Page Headers. It creates a string with all my HTML code. THe HTML code was copied from an existing aspx page and so I know the HTML code is correct. It includes one parameter for the title of the page that should be displayed.
2. On the pages page_load event, I set the function to a public string.
3. On the aspx page, I attempt to display the page header using
<% =strPageHeader %>
RESULTS
THe only thing that is displayed is the Page Title that is passed as a parameter.
WHen I try to view the htlm using view source, all the html is there and it looks correct.
I have searched many sites for a resolution to this issue and have not found anything. This leads me to believe that this may not be the best way to do this in asp.net.
Any suggestions to get my approach working or a better approach would be greatly appreciates.
Answer : ASP.net 3.5 Using VB.net function to generate HTLM code on aspx page
select concat(year(YourDate), '-',Month(YourDate)) from table
Random Solutions
"A policy is in effect on your computer which prevents you from connecting to this printer queue"
Push not working on iphone with Exchange 2010...
PHP redirection
SSG5 VPN Routing, internal LAN route works, VPN route doesnt.
Setting up of a Forest Trust
Cannot RDP to W2008R2 Server 'Computer Name' but can to its IP Address
Passing combobox var to loaded swf as3
Create linked server from MS Sql to oracle server
Use .NET or SSIS to download Exhange email and process attachments
How can I reference information from one sheet to another by values selected in a drop down menu