Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / January 2004

Tip: Looking for answers? Try searching our database.

Web Server controls not showing up on web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark C - 29 Jan 2004 20:41 GMT
I have been playing with Visual Studio and trying to learn it.  I am creating a simple web application with a web form named WebForm1.aspx (using defaults).  I placed Label and Button from the Web Forms section of the toolbox.  I double clicked the button to get the code behind event for the button onclick event.  I assign the value of "Hello World" (real basic stuff) to the label text property.  After building and browsing all I see is the Label.   The button does not display.  If I add an HTML button it displays, but I can't add any code to it.  I am running on XP Pro, Visual Studio Enterprise Edition.  I am attaching my code below, but I can't figure out why this doesn't work.  (I took it from a training manual that is step by step.)  IIS is running on my machine as far as I can tell

Thanks in advance for any clarification

//  Cod
using System
using System.Collections
using System.ComponentModel
using System.Data
using System.Drawing
using System.Web
using System.Web.SessionState
using System.Web.UI
using System.Web.UI.WebControls
using System.Web.UI.HtmlControls

namespace MyFirstWebApplicationC

    /// <summary
    /// Summary description for WebForm1
    /// </summary
    public class WebForm1 : System.Web.UI.Pag
   
        protected System.Web.UI.WebControls.Label lblMessage
        protected System.Web.UI.WebControls.Button Button1

        private void Page_Load(object sender, System.EventArgs e
       
            // Put user code to initialize the page her
       

        #region Web Form Designer generated cod
        override protected void OnInit(EventArgs e
       
            /
            // CODEGEN: This call is required by the ASP.NET Web Form Designer
            /
            InitializeComponent()
            base.OnInit(e)
       
   
        /// <summary
        /// Required method for Designer support - do not modif
        /// the contents of this method with the code editor
        /// </summary
        private void InitializeComponent(
        {  
            this.Button1.Click += new System.EventHandler(this.Button1_Click)
            this.Load += new System.EventHandler(this.Page_Load)

       
        #endregio

        private void Button1_Click(object sender, System.EventArgs e
       
            lblMessage.Text = "Hello World!"
Victor Garcia Aprea [MVP] - 30 Jan 2004 03:52 GMT
Hi Mark,

It sounds like ASP.NET is not properly registered, please take a look at the
aspnet_regiis.exe console application to re-register ASP.NET and see if that
helps.

Signature

Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

> I have been playing with Visual Studio and trying to learn it.  I am creating a simple web application with a web form named WebForm1.aspx (using
defaults).  I placed Label and Button from the Web Forms section of the
toolbox.  I double clicked the button to get the code behind event for the
button onclick event.  I assign the value of "Hello World" (real basic
stuff) to the label text property.  After building and browsing all I see is
the Label.   The button does not display.  If I add an HTML button it
displays, but I can't add any code to it.  I am running on XP Pro, Visual
Studio Enterprise Edition.  I am attaching my code below, but I can't figure
out why this doesn't work.  (I took it from a training manual that is step
by step.)  IIS is running on my machine as far as I can tell.

> Thanks in advance for any clarification.
>
[quoted text clipped - 54 lines]
> }
> }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.