.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ModalPopUp and validation on same button?

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net

Is there a way to get the modalpopup extender to only execute if all the validation = true on the same button.  As soon as I tie  the modal popup to the button with the validation check, the validation either doesn't happen or the popup displays and the validation works behind and that's not what I want.

View Complete Post

More Related Resource Links

need help to implement validation with save button

hi, i was defeated a problem relating to the save button. i am running vb.net 2005 and the database is access. i have a project with application so there's a form which i wanted to restrict the user to fill all the textfields. say there are 5 textfiled(Fname, email and so on). what i am interested is that when even some one open the form and tries to fill some of them, there should be prompting message asking them to fill all, else the save button has to do its task. here's the code i was playing around but got a problem that when i fill all the text fields, there's no save only the restricting msg appears(" plz, fill the form probably then click save") NB: i put this code inside the save button. --------------------------------------------------------------- Dim success As Boolean Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click If Product_DetailsBindingSource.Current Is Nothing Then MessageBox.Show("plz, fill the  feilds then click save button", Me.Text) success = False Else Me.Validate() success = DirectCast(Product_DetailsBindingSource.Current, products).Save() MessageBox.Show("save has completed successfully") Panel1.Show() End If   ------------------------ thanks so mch best regards hossenel

Form Validation, BindingGroup, CommandBinding, Disabling Commit Button

Hi, I've been struggling with this for a few days and I couldn't get a clear and simple answer anywhere. Now that I've fixed the problem on my end, I figured I would share. The approach is about disabling a "Commit" button (Save/Apply/OK/whatever) whenever an error exists in the form. Basically, I have a form with several different controls (textbox, combobox, checkbox to name a few). All of them are bound to a custom object within my code, that I referenced using "RootGrid.DataContext = myObjectInstance". They also use BindingValidationRules, so the user is warned that they have wrong data in there. There's plenty of information about how to achieve this on the internet - but the real question mark is: how can I disable a button if there are errors in the form? First, go ahead and make those control validations work. For example, write a ValidationRule for a textbox to make sure it's only numbers in there, and then another ValidationRule for another textbox that ensures no digits are contained. Once again, google is full of examples on how to achieve this. Then, you need to group all of those controls into a BindingGroup. Before doing so, we will design a ValidationRule that will ensure the BindingGroup is free of validation errors:   public class ErrorFreeBindingGroup : ValidationRule { private string _errorMessage; public str

show modalpopup extender in radio button click.



I have a radio button list and it is populating data from database.

I want to show a modal popup extender when someone clicks a specific value in the radio button list.

For example:

display the modal popup when radiobuttonlist.value=="13".

is this possible??

ModalPopup, Validators and Client Button Click


Hi All,

I have a modal popup containing a text box and a required field validator.

If I click on the OK button with no value specified, it closes the popup after briefly showing the required field validator's error text.

I've seen some posts about how to get validators working with modal popups by not setting the OKButton property, but the trouble is I need  to have both the validator and a  button click (this is where I save the data)

Can anyone help?


modalpopup closes on button click


I have a modalpopup which has formview in edit mode. inside this modalpopup besides OK and cancel buttons there is a Search button. Modalpopup is enclosed in updatepanel. When I click Search button, it closes modalpopup. How to avoid closing of modalpopup?

Asif Hameed

Ribbon Save Button Causes Validation


On a publishing site in 2010, it appears that the ribbon save button triggers validation on validators that have a specific validation group defined.  I'm confused as to how this happens, but it apparently does.

I have a web part with a simple input form and some validators.  When switching out of edit mode, the validators are triggered and the page won't switch back to normal view.

Any ideas?

Make validation controls trigger only not clicking on submit button and not on other navigational bu


I have required validation controls on a page.  If the user got to this page by mistake and wants to go to a different section of the website using the navigational buttons; required validators are triggered and it will not let the user navigate away.  How do I get validators to trigger only when a submit button is clicked?


Thanks in advance!

All the Button click event perform same validation in sharepoint

I have created a web part in C# which is getting placed in shrepoint.i have two button on it.One is for submitt and other is for clearing the boxes on the web part.i want to clear the text boxes at client side in the click event,how to do that?
i m able to clear it but it is performing at the client side.
Is it required to use concept of JAVA script .If yes then how can i use it

cancel button causes validation


I have two buttons: Save and Cancel.  I have set CauseValidation = "False" for this cancel button.  But when I click the button for the first time, it still causes validation while it does not cause validation if I click it again. 

I tried to fix it by defining validation group for all validation controls, controls that are validated, and save button.  But still the cancel button would validate when first time it is clicked. 

Could anybody tell me how to fix it?


Client side validation while "OK" button clicked in list in sharepoint 2007


Hi All,

while saving data to a list in sharepoint all the validation are server side ,can i do it client side in sharepoint 2007

Thanks and Regards Er.Pradipta Nayak

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

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
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Integer Validation



I need to make validation for Textbox to allow enter integer stated by 9 or 6 or 5 , and also maximum 8 digits , how to do that ?





ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend