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
sbs 2008 windows update failing - error 8024402C
exchange 2010 CAS high availablity/ISA or harware load balancing
what is the best linux distro and ide for web programming (PHP) ?
AIX DB2 error
Modal Popup Validation Summary
google search API C# jSON question
Call Procedure from VB6 and pass paremeters
DP 6.0 Win2K cell mgr - backup to iSCSI lun using file device
Replace apostrophes in all Session Variables in C#?
htaccess Partial Query String Rewrite