I want to validate textbox only if checkbox is unchecked, if checkbox is checked no need to validate textbox as require field.
At where and when I have to attach and deattach RequireFieldValidator to textbox?
return Page_Validate("VALIDATION GROUP NAME");
I added a CustomValidator to the textbox and add ClientValidationFunction
This is my solution to share with other people those who have problem as mine
<asp:CustomValidatorID="CustomValidator1"runat="server"ClientValidationFunction="CheckPorts"ControlToValidate="txtPort"ErrorMessage="Please checked at checkbox or enter Port code in textbox."ValidateEmptyText="True"ValidationGroup="RegisterAgentUser">*</asp:CustomValidator>
ValidateEmptyText="True" also important here, if not control will not doing validation.
Currently I have a page with a button on it. When the button is clicked a query string is passed to generic handler. The purpose of this handler is to generate letters for individual students that were in a class (the query string is the class id). As the files are generated they are added to a zip file so the user only has to download one file. Everything works perfectly fine including the downloading of the file.
However my problem is I need a way to know when the handler has finished and to retrieve data from it. Specifically, as the handler is looping through all the students it may find that some students do not have all the necessary data saved in the database in order to generate the appropriate letter. In this case the students name is save in a List(Of String) so that it can inform the user, but continues creating the rest of the letters.
I have tried using HttpContext.Current.Items.Add("BlankStudents", BlankStudentRecords) and HttpContext.Current.Session("BlankStudents") = BlankStudentRecords in order to save the list. The latter did not work because it says the object is not set to an instance and I'm assuming it is referring to the session. The former did work, however the ASP page that calls the handler does not post back so it can't try and read from the HttpContext.
I tried using a redirect but I get a "Cannot redirect after HTTP headers have been sent" because this redirect is being done after the zip file is transmitted to the client. What would be the best way to accomplish this? Would it be better to add the zip file and the List(Of String) both to the HttpContext.Current.Items and then redirect back to the page and initiate the download from there, or is there an even better and efficient method.
Here is my scenarios...
I have 4 comboboxes , At page_Load bind only one. Bind Second combo after user select first combo. Third combo depend on Second combo and fourth one depend on Third one. (here to avoid page refreshing I use RadAjaxPanel)
After all if user click on button show data in Grid. When user doubleClick on a row from grid will go to next page, from second page when user click on Browser's back button all selected data combox and data in grid are gone.
Last Visit: 31-Dec-99 19:00 Last Update: 21-Jan-22 0:33