C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Embedding HTML into ASP.Net Form


Posted Date: 19 Apr 2005    Resource Type: Articles    Category: .NET Framework
Author: SattyMember Level: Gold    
Rating: 1 out of 5Points: 10



Introduction


Some of the real-time Projects certainly has User-Level restrictions.Based upon that u need to show the form.Some times its
really hard to solely depend upon the Enabled and disabled property as because it may need to be refreshed sometimes or postback
or may be changing depending upon several reasons.so it would be better if theres some other alternative for this Access level.

While working on my project even i faced the same hardship and finally thought of an idea of using the StringBuilder function
to embed the HTML in the ASP.Net Form.It really worked and the beauty is i can even make the stringbuilder to build the HTML string
depending upon the User.




ASP.Net Code



StringBuilder addstring = new StringBuilder();
addstring.Append(@"<A href=""DisplayFlatDetails.aspx?State=");
addstring.Append(Statename.SelectedItem.Value.ToString());
addstring.Append(@"&Country=");
addstring.Append(txtCountry.Text.ToString().Trim());
addstring.Append(@"&TracingNo=");
addstring.Append(txtTracing.Text.ToString().Trim());
addstring.Append(@"&BlockNumber=");
addstring.Append(txtBlockNumber.Text.ToString().Trim());
addstring.Append(@"&FlatID=");
addstring.Append(txtFlatID.ToString().Trim());
addstring.Append(@""">");
addstring.Append(@"<font face=""verdana"" size=""2"">Display Flat Details</font></A>");
return addstring.ToString();








Summary


Finally if u want to place this form or link or any control in a certain place then drag a Label control and place that Label
wherever u want the form to be.Its not a big deal i thought this could be useful for the beginners.If u have any queries or comments please feel free to contact me.
SAtty




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Message Box: Server Side and Client Side
Previous Resource: How to find out if proxy is enabled in the local computer
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use