See no controls on browser

  • Thread starter Thread starter THQ
  • Start date Start date
T

THQ

I have visual studio .NET V7 on XP pro and IIS 5.1. I
created an ASP.NET web application with a label, a
textbox and a button in c#. When I access the file
MyWebForm.aspx in IE 6 or using
http://localhost/MyWebForm.aspx or click the menu
item "View in Browser" or "Build and Browse" inside VS
development environment; there is no controls showing up
in IE. There is no error generated too. Anyone knows how
to fix this problem and help a frustrated ASP.NET newbie.

Thank you in advance for your help
 
Can you paste some code? Are you adding the controls within a codebehind
page? What control did you add the label, textbox and button to? Try
adding a panel to the aspx page, and adding the controls to it in your
codebehind page.

ASPX:
....
<asp:Panel ID="myPanel" Width="100%" Runat="server" />
....

ASPX.CS:
....
Panel myPanel = new Panel();
myPanel.Controls.Add(myButton);
myPanel.Controls.Add(myLabel);
myPanel.Controls.Add(myTextBox);
....
 
THQ,

Try running the following from a Visual Studio .NET Command Prompt:

aspnet_regiis -i

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
 
Back
Top