Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Form Designer Generated Code 1

Status
Not open for further replies.

kizmar2

Programmer
May 25, 2004
164
US
I just coded an ASPX page with a simple form on it using CustomValidation objects and two ASP:TEXTBOX'es. I couldn't figure out why the .VB wasn't recognizing the form objects. I realized that they weren't being put in the Web Form Designer Generated Code automatically (i.e. - "Protected WithEvents txtUser As System.Web.UI.WebControls.TextBox")

Anyone know why this would be?

KizMar
------------
 
Are you coding the textboxes yourself? If so, the Protected With Events won't be created. This is done if you drag and drop the controls on the form.

Jim
 
That's not always the case (unless of course you are creating the controls dynamically). If you add the control in the HTML view, then switch to design, then view the code behind file, most of the time VS will add the reference for you.

Doesn't look to be so much of a problem in 2005 (or not that I've noticed so far).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Does 2005 mess up the HTML code tabbing when you view things in Design view?

I have all the auto-formatting turned off and it still messes up the html formatting if I view things in design view.

I hate that.

KizMar
------------
 
It did that in 2003 and then it was a problem. Generally it isn't that bad now as you can collapse regions in the HTML (and view a hierachy of where you are in relation to other tags) so it doesn't matter so much about how it re-arranges the HTML you typed in.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top