Click here to Skip to main content
15,891,567 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with JavaScript Pin
sashidhar16-Sep-09 21:16
sashidhar16-Sep-09 21:16 
AnswerRe: Problem with JavaScript Pin
Muhammad Mazhar17-Sep-09 9:27
Muhammad Mazhar17-Sep-09 9:27 
QuestionProblem with Ajax call from Infragistics ultrawebgrid Pin
sskala16-Sep-09 6:27
sskala16-Sep-09 6:27 
Questionasp:boundcolumn dataformatstring - How do you suppress the trailing zero Pin
Steve van Niman16-Sep-09 6:05
Steve van Niman16-Sep-09 6:05 
QuestionAjaxModalPopup clicking OK button ,should reatin focus on textbox Pin
yadlaprasad16-Sep-09 4:15
yadlaprasad16-Sep-09 4:15 
AnswerRe: AjaxModalPopup clicking OK button ,should reatin focus on textbox Pin
Not Active16-Sep-09 5:27
mentorNot Active16-Sep-09 5:27 
AnswerRe: AjaxModalPopup clicking OK button ,should reatin focus on textbox Pin
Muhammad Mazhar17-Sep-09 9:30
Muhammad Mazhar17-Sep-09 9:30 
QuestionRequiredFieldValidator doesn't work Pin
Jan R Hansen16-Sep-09 4:11
Jan R Hansen16-Sep-09 4:11 
Something must be wrong, as this is probably the most basic validation example ever - yet I still can't get it to work properly, and I actually suspect an error somewhere.

Create an aspx page with a textbox, a requiredfieldvalidator and a button. Set the validator to validate the textbox and set its text property to "*". Run the project. Now, I would assume that clicking the textbox and then tabbing to the button would show me the text-message from the validator (the red *), indicating that I haven't entered data where I need. Guess what - it doesn't show up...

However, clicking the field, entering data, tabbing away and then back, deleting the data again and then tabbing away again DOES show the red *. Because the validation of the textbox is handled from the onchange event. Try running this in the url field:
javascript:void(alert(document.all.TextBox1.onchange))
- it will give you
Message from webpage
---------------------------
function anonymous() {
ValidatorOnChange(event);
}
, whereas the
javascript:void(alert(document.all.TextBox1.onchange))
will return null.

Manually hooking the onblur event to the onchange event as so:
javascript:void(document.all.TextBox1.onblur=document.all.TextBox1.onchange)
will introduce somehow correct behaviour.

Now - is it me who has failed to understand the simples of all validation scenarios - or is the requiredfieldvalidator broken. I hope it is the first option, but what the h... am I missing?

Sample code:

<form id="form1" runat="server">
    <div>
		<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
		<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
			ErrorMessage="RequiredFieldValidator" 
			ControlToValidate="TextBox1"
			Text="*"></asp:RequiredFieldValidator>
		<asp:Button ID="Button1" runat="server" Text="Button"/>
    </div>
    </form>


Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

AnswerRe: RequiredFieldValidator doesn't work Pin
Not Active16-Sep-09 5:24
mentorNot Active16-Sep-09 5:24 
QuestionFingerprint biometrics integration into ASP.Net application Pin
Joseph Cheriaux MPORANYI16-Sep-09 3:53
Joseph Cheriaux MPORANYI16-Sep-09 3:53 
AnswerRe: Fingerprint biometrics integration into ASP.Net application Pin
Manas Bhardwaj16-Sep-09 4:13
professionalManas Bhardwaj16-Sep-09 4:13 
AnswerRe: Fingerprint biometrics integration into ASP.Net application Pin
Abhishek Sur16-Sep-09 9:33
professionalAbhishek Sur16-Sep-09 9:33 
QuestionWeb Site Administration Tool How to change the Password length ASP.NET 3.5 Pin
BoySetsFire16-Sep-09 2:55
BoySetsFire16-Sep-09 2:55 
AnswerRe: Web Site Administration Tool How to change the Password length ASP.NET 3.5 Pin
sashidhar16-Sep-09 21:23
sashidhar16-Sep-09 21:23 
GeneralRe: Web Site Administration Tool How to change the Password length ASP.NET 3.5 Pin
BoySetsFire17-Sep-09 1:43
BoySetsFire17-Sep-09 1:43 
Questionuse windows usercontrol in web application Pin
ramki.pindi16-Sep-09 2:48
ramki.pindi16-Sep-09 2:48 
AnswerRe: use windows usercontrol in web application Pin
Abhishek Sur16-Sep-09 9:26
professionalAbhishek Sur16-Sep-09 9:26 
GeneralRe: use windows usercontrol in web application Pin
ramki.pindi16-Sep-09 18:52
ramki.pindi16-Sep-09 18:52 
GeneralRe: use windows usercontrol in web application Pin
Muhammad Mazhar17-Sep-09 9:32
Muhammad Mazhar17-Sep-09 9:32 
GeneralRe: use windows usercontrol in web application Pin
ramki.pindi17-Sep-09 18:50
ramki.pindi17-Sep-09 18:50 
QuestionRestrict users to access the help file, download js files Pin
Rijz16-Sep-09 2:45
Rijz16-Sep-09 2:45 
AnswerRe: Restrict users to access the help file, download js files Pin
Abhishek Sur16-Sep-09 9:21
professionalAbhishek Sur16-Sep-09 9:21 
QuestionAjax AutoComplete Extender(urgent) Pin
Devkranth Kishore Vanja16-Sep-09 1:57
Devkranth Kishore Vanja16-Sep-09 1:57 
AnswerRe: Ajax AutoComplete Extender(urgent) Pin
Arun Jacob16-Sep-09 1:59
Arun Jacob16-Sep-09 1:59 
GeneralRe: Ajax AutoComplete Extender(urgent) Pin
J4amieC16-Sep-09 2:19
J4amieC16-Sep-09 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.