Click here to Skip to main content
14,634,450 members
Home » Discussions » ASP.NET
   

ASP.NET

 
AnswerRe: Problem with JavaScript Pin
sashidhar16-Sep-09 21:16
Membersashidhar16-Sep-09 21:16 
AnswerRe: Problem with JavaScript Pin
Muhammad Mazhar17-Sep-09 9:27
MemberMuhammad Mazhar17-Sep-09 9:27 
QuestionProblem with Ajax call from Infragistics ultrawebgrid Pin
sskala16-Sep-09 6:27
Membersskala16-Sep-09 6:27 
Questionasp:boundcolumn dataformatstring - How do you suppress the trailing zero Pin
Steve van Niman16-Sep-09 6:05
MemberSteve van Niman16-Sep-09 6:05 
QuestionAjaxModalPopup clicking OK button ,should reatin focus on textbox Pin
yadlaprasad16-Sep-09 4:15
Memberyadlaprasad16-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
MemberMuhammad Mazhar17-Sep-09 9:30 
QuestionRequiredFieldValidator doesn't work Pin
Jan R Hansen16-Sep-09 4:11
MemberJan 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
MemberJoseph 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
MemberBoySetsFire16-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
Membersashidhar16-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
MemberBoySetsFire17-Sep-09 1:43 
Questionuse windows usercontrol in web application Pin
ramki.pindi16-Sep-09 2:48
Memberramki.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
Memberramki.pindi16-Sep-09 18:52 
GeneralRe: use windows usercontrol in web application Pin
Muhammad Mazhar17-Sep-09 9:32
MemberMuhammad Mazhar17-Sep-09 9:32 
GeneralRe: use windows usercontrol in web application Pin
ramki.pindi17-Sep-09 18:50
Memberramki.pindi17-Sep-09 18:50 
QuestionRestrict users to access the help file, download js files Pin
Rijz16-Sep-09 2:45
MemberRijz16-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
MemberDevkranth Kishore Vanja16-Sep-09 1:57 
AnswerRe: Ajax AutoComplete Extender(urgent) Pin
Arun Jacob16-Sep-09 1:59
MemberArun Jacob16-Sep-09 1:59 
GeneralRe: Ajax AutoComplete Extender(urgent) Pin
J4amieC16-Sep-09 2:19
MemberJ4amieC16-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.