A Newbie Question

  • Thread starter Thread starter Greg Smith
  • Start date Start date
G

Greg Smith

I am just learning ASP.Net. Can somebody please give me an example of
creating, placing and positioning a text box on a web page, all in code?

Any help is greatly appreciated.
 
Hi Greg,

Based on my research and experience, I believe that the following URL is
helpful to you.

Welcome to the ASP.NET QuickStart Tutorial
http://www.asp.net/Tutorials/quickstart.aspx
"...
The ASP.NET QuickStart is a series of ASP.NET samples and supporting
commentary designed to quickly acquaint developers with the syntax,
architecture, and power of the ASP.NET Web programming framework. The
QuickStart samples are designed to be short, easy-to-understand
illustrations of ASP.NET features.
..."

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Greg,

I have done more research regarding this issue. As I understand, what you
really want is creating and positioning a control dynamically.

Based on my research and experience, we can use the place holder control.
Please refer to the following code snippet. ( It uses a label but it is
similar with a textbox)

private void Button1_Click(object sender, System.EventArgs e)
{
Label myLabel = new Label ( );
myLabel.Text = "Welcome to ASP.NET";
Placeholder2.Controls.Add ( myLabel );
myLabel.Attributes.Add("style",@"Z-INDEX: 102; LEFT: 16px; POSITION:
absolute; TOP: 48px");
}

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top