Rob Garrett - Blogs

Welcome to Rob Garrett - Blogs Sign in | Join | Help
in Search
Google

Software/Technology Discussion

Software and Technology Tid-bits

"Submit" ASP.NET and SharePoint

One of my developers and I ran into an interesting problem today - we'd migrated a web site over to SharePoint 2007 (using a popular content migration tool) and found that all page postback calls in SharePoint were giving JavaScript errors, specifically:

Object doesn't support property or method.

Turns out that our master page and page layouts contained input controls (text boxes) with name/id as "submit".  Use of this reserved name sent ASP.NET's JavaScript code into a tailspin and wrecked havoc with any postback submissions.

So, when you develop web sites in ASP.NET and/or SharePoint, be inventive with names for your buttons, text boxes and hidden fields - how about btnSubmit ;)

I read somewhere else that naming the main ASP.NET form "default" is a no-no also.

Share this post: Email it! | bookmark it! | digg it! | reddit!
Published Wednesday, January 02, 2008 1:23 PM by Rob Garrett

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Emad Ibrahim said:

Interesting, but can you elaborate on naming the main page "default"?... because the class name itself is _default but the page is default.aspx...
January 3, 2008 1:16 PM
 

Rob Garrett said:

Emad,

   I only read about "default" in passing, so cannot give it any credence, I'm guessing that it's not a good idea to give the main form an ID of "default".

R.

January 3, 2008 9:28 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

Blurb


Head Shot
Rob Garrett is a British Expat living in Maryland USA. Rob is a trained software engineer and experienced in Windows .NET development.

Rob enjoys listening to Rock music, posting to blogs, driving in the country with the sunroof open, beer (not in conjunction with country driving) and spending time with his family.

This Blog

Syndication

Powered by Community Server, by Telligent Systems