Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Where can I find out how to do the things that I used with the older ASP.NET Framework? (v1.1)

 

For example, ValidationExpression and onfocus appear to no longer be supported in Visual Web Developer 2005. What have they been replaced with?

 

I used to use ValidationExpression to test email addresses in an <asp:textbox> field:

 

ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"

 

Also, onfocus is a neat piece of javascript, but the new IDEs give a warning that this is not a valid attribute:

 

onfocus="if(this.value=='Enter Text Here')this.value='';

 

Are these functions gone, or is the IDE simply pointing out that they are not part of ASP.NET 2.0?

 

Will these still work when I post them to run on the server?

  • Administrators
Posted
What is the exact warning or error given by VS regarding these attributes? One thing the 2005 IDE does better than earlier versions of VS is validating your HTML correctly against the 'proper' standards - the errors may be down to the validation level set in VS's options or because of the DOCTYPE defined in the aspx page. As onfocus is a client side scripting function it should work as long as the client supports it regardless of the VS error.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
I see. My files are currently running on version 1.1 Framework, but I am trying to get everything to work offline before version 2.0 Framework is implemented. When I saw all the warnings, I was left to believe that these features did not work in 2.0. Since we do not have version 2.0 Framework running yet, there is no where to test.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...