Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey all,

 

I have a form with required text fields and such. When the user hits submit, they scroll down a bit and the text fields are not displayed on the screen. If they left the fields blank, they give the message I entered in the validator, but there is no alert to the user. So it appears that they click the button and absolutely nothing happens. If they don't scroll up and see the red warning messages, they may not figure out what the problem is.

 

Is there a way to either give them an alert window, or move the focus to the top of the page?

 

I'm thinking I can make a custom validator and have the same behavior as there is now, but also add a "response.redirect(#top)" or something along those lines, right?

 

Is there an easier way? Thanks :)

Posted

thanks damp, that was perfect :) it jumped me right back to the empty fields, I chose not to list them at the bottom, but it's nice that I can do that too.

 

Damp, just curious, I'm using dreamweaver to create this form, and several other asp.net things I've worked on. How much easier would it be if I was using visualstudio.net?

  • Administrators
Posted

Not used Dreamweaver for quite a while now so I can't really give a good comparison.

Doesn't stop me having an opinion though ;) VS.Net does integrate well with the ASP.Net environment but it does have it's issues (reformatting your HTML being a big issue). The control integration (databinding, xsd generation etc) is very nice though.

 

However if you are in no real rush to convert over soon you may want to wait till next year when VS 2005 is released as the web development side of things gets a serious overhaul and many of the issues are fixed and considerable productivity enhancements have been added.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

cool thanks :) I'm just noticing that I have to code all this by hand, and was thinking "hmm if I had vs studio would I just be dropping in all these things visually, saving myself a lot of time, etc"

 

coding by hand is nice though cause it'll teach me the intricacies (or force me to post lots of questions here lol)

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...