The problem is that if the textcap changetext event is fired which is in the updatepannel then the captcha will always validate to false. If the textcap changetext event is not fired then all goes well.
I have used your mathematical captcha in my project but it is not working on all browsers.if I open the page in one browser & then copy the aaaurl in other browser the other browser does not show me the captcha.
I am creating dropdown controls in code behind. in some conditions I need to add validation control to dropdowlist. But Validation not firing when I submit button.
If mQuestion.RequiredToAnswer = True Then Dim mValidator As New RequiredFieldValidator mValidator.ControlToValidate = mDDL.ID mValidator.InitialValue = mDDL.Items(0).Text mValidator.Display = ValidatorDisplay.Dynamic mValidator.ErrorMessage = "* Required!" mTableCell.Controls.Add(mValidator) End If
I have other dropdown controls on aspx page with validation comtrols. Those are working fine. Only when I ddl and validations from code not working?
It worked correctly in Localhost but when I upload my site on host when I open page that I used captcha for it, it didn't show captcha image so I can't enter captcha in textbox
I use IIS6 but i try your code but again it didn't show any image
see here in code is Path="Image.ashx" but i didn't have any file like that im my website? what is that?
when i see view source for captcha is below code
<img alt = 'Captcha' src = '/Image.ashx?key=potezmL9FvScT6cn0%2b2Jnnj3liguFvrFBT38H9ZMCHA%3d&color=%23000000' align = 'NotSet' /><input type = 'hidden' name = 'ASPNET_Captcha1_Expression' value = 'LL/VwR57t2e4qP5UmLxEDA==' /></span>
and when i click on SRC below error occure
The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Image.ashx
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
jQuery validation is working fine on my machine, when i pushed it to test server it won't it's throwing some errors which is kind of surprising.These are the errors I am getting: $.validator is null or not an object...I've never gotten this error before and it throwing an error when I declared a variable like var isValid.I don't know what to do. I am doing the custom validation methods not in the document.ready(). Does this cause this error? I wonder because all jquery validations are passing and hitting the server side validations.
I am using .net 4.0 on my localhost and i have a form with some textbox and file uplaod controls,for validation i have used various validation controls and a regular expression for validating image format. the web page is working fine at my side ,but when i upload it on server (Godady) and when my client uses the webpage,it just dont work the way it should. Is there any thing that is keeping the validation not work.
I have a asp.net page with a text box to enter the zip code.I use requiredField Validation for this zip code text box.I use asp:ImageButton to navigate back and forth from this screen.My problem is if i enter an invalid zipcode( or blank), it will stop the post back and shows the error message if i use BACK button (image button).But it just post back and go to the next screen IF i click the forward image button!
I have implemented a validation for the file upload control such that, only when some entry is made in the file upload control textbox, the Upload button will be enabled else it wil be disabled.
When I implemented this , the validation on the Upload button is not working. For the upload button I need to check certain fields are not empty. But I find that because of the above implementation, the validation function for this one is not working .
I have a panel (say, panel1) inside another panel (say, outer-panel)....The panel1 is visible only when a checkbox is checked in the outer-panel. I am using script manager, update panel and trigger to do this.
Now I have many text boxes in the panel1. I have to put a validation on all the boxes.
I tried to test this by putting validation on 2 boxes and this works fine on my local machine. When I put the same logic on the server, it does not. Of course the page on my local machine has fewer text boxes compared to the page on server. But I do not understand why the same logic works on my local machine and does not work on the server.
The page on the sever is a very long one and also it has a captcha control..... when ever I try not to enter text in one the text boxes which has validation and then hit submit...it redirects me to another page with out prompting for the validation error.
I have applied some asp validation controls on a page ,but on clicking Save button data is getting saved without throwing any validation . But as I am entering data for the next time and then click save button then it's working.
I am trying fire asp validation on page. But it is not working when browser security is high. You can change security setting in IE under tools --> Options --> Security Tab.When i am clicking the button then validation should fired and event shound not fires but if security is high then page is post back and button Click event also fired.Can any one suggest me that how i can handle this problem. I could not handle all the validation on server (Code Behind.).Also Ajax tools also stop working when browser security is high.
Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate ' Get file name Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload) Dim UploadFileName As String = uploadAvatar.PostedFile.FileName If UploadFileName = "" Then ' There is no file selected args.IsValid = False Else Dim Extension As String = UploadFileName.Substring(UploadFileName.LastIndexOf(".") + 1).ToLower() If Extension = "xls" Or Extension = "xml" Then args.IsValid = True ' Valid file type Else args.IsValid = False ' Not valid file type End If End If End Sub <table> <div> <td><asp:FileUpload ID="uploadAvatar" runat="server" /></td> <td><asp:LinkButton ID="BtnUpdate" runat="server" CausesValidation="True" CommandName="Update" Text="Update" CssClass="updatebutton" OnClientClick="ValidateFileUpload();" /></td> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidateFileUpload" ErrorMessage="Please select valid .jpg or .bmp file" ></asp:CustomValidator> <td><asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" CssClass="cancelbutton" /></td> </tr> </div> </table>
I have a placeholder to which I programmatically add DataGrids... In the DataGrids, I programmatically add TextBoxes along with dynamic validations. Somehow, the DataGrids show up, but the dynamic validations don't work. If I set them to static, the blank space for them appears, but still, they wont work.
I added dynamic checkboxlist.The javascript validation for checkboxlist(dynamic) in firefox + asp.net is not working,but in IE its working fine.why the javascript validation is not firing for dynamical checkboxlist.
Hello to all I am using required field validator and i want to disable it on buttob click event on submitt button but the button click event is not working properly as it disable the validator on second time when i click the button,and refersing the page first time and i do'nt want to referesh page here i am attching my aspx as well as aspx/cs code