.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

Enable Disable Save Button in Winforms App

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :Windows Application
Hi, In our windows forms application we have many forms with "Save" buttons. We want to enable them only if the data in the form is changed. At the moment it is handed by adding flags to check whether the data is dirty. Is there any easy way to handle this? May be something with the famework? Thanks,CJ

View Complete Post

More Related Resource Links

How to conditionally Enable/Disable Button control using JavaScript ?

hi all... i have a Button control & a TextBox control on my web page. The Button control is initially Disabled. I want that while typing into TextBox, when the length of the contents of TextBox reaches to 12 (i.e. when i type 12th character), the Button Control should be Enabled & if the length again comes down to less than 12, the Button control should again be Disabled... How can i do this using JavaScript...?? Does anyone know how to do this...?? Please help. It's urgent... Thanx in advance to all posts !

Radio Button Enable Disable Multiple Panel


using c# asp.net i m able to achieve the enable and disable through auto postback

but i want this thing to achieve by javascript can anyone help me

Default Page

protected void Button1_Click(object sender, EventArgs e)
        string url = "default2.aspx?";
        url += "sid=" + Server.UrlEncode(DropDownList1.SelectedItem.Text.Trim());

Default 2

protected void Page_Load(object sender, EventArgs e)
        Panel1.Visible = false;
        Panel2.Visible = false;
        Panel3.Visible = false;
        Panel4.Visible = false;
        if (!IsPostBack)
            if (Request.QueryString != null)
                Label1.Text = Request.QueryString["sid"].ToString();

    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
        if (Request.QueryString["sid"] == "new")
            Panel1.Visible = true;
            Panel2.Visible = false;
        if (Request.QueryString["sid"] == "old")
            Panel3.Visible = true;
            Panel4.Visible = false;
    protected void RadioButton2_CheckedChanged(object sender, EventArgs e)

Checkbox disable/enable


I hope someone can be kind enough to help/advise me with this.

I have a web form with multiple checkboxes on it , with one of the checkboxes as the main (controlling) checkbox.  By this I mean that when this main checkbox is checked then all the other checkboxes need to be disable and when its unchecked these other checkboxes need to be enable.

I've found (plenty of) code to do this in javascript but i would really prefer to to it in vb(.net), if possible.

I hope all this makes sense to you.


Enable Go Button after entering data in all fields using javascript funtion


Hi friends,

My page is having one gridview with check boxes,two textboxes and one button just like this see this link now i want to enable go button whenever user has select checkbox in gridview and he needs to enter text in two textboxes. i have written onkeyup event for two textboxes to test whether user enter text in textboxes or not but i am unable to write javascript function to check whether user has selected checkbox in gridview or not to enable go button .My requiremnet is user need to enter three inputs select atleast one checkbox in gridview and he needs to enter text in two textboxes.please friends pls tell me how to write javascript function to find whether user has selected the checkbox in gridview or not

sitemap control user rights enable and disable



iam using masterpage and sitemap in my project, what i want to is that

if user login is did, based on the user previlage in need to show the sitemap menu page

if user i have the previlage to see the page then i should enable that page otherwise

i need disable that page

looking for the valuable suggestions

TabControl - Disable/Enable tab page

I have a tabcontrol with 2 pages. OnLoad the 2nd Tabpage shall be disabled (grayed out and not selectable). Later with code I need to enable the 2nd tab. Any Ideas how this can be done? please./Morten

Creating a "Save Button" in a browser based Form

I'm not sure if I'm missing something obvious, but I need to have the funtionality of the "Save Button", which is available and works on the tool bar, available in the form...and I can't seem figure out how to do it.I've found examples, in this forum, of how to use the "Submit Button" to act as the "Save Button", which did work for me, but only when specific basic criteria was met.The criteria that I now have is that I'm initiating a workflow to automatically start when a new item is created.  My workflow then moves the form to one of a few possible different form libraries, based on the logic in my workflow.  The different form libraries are to manage different teams of people that would have access to the Form and then that team would process the form accordingly.My specific situation: 1 - User opens a new form (works) 2 - User enters data and then submits the new form (works) 3 - Workflow is initiated and the form is moved to another form library to be worked on by a select group of people (works) 4 - The form is opened and reviewed and some changes are made to the form data by the select group of people (works) 5 - The form data in the form libary is updated (works, but only if the save button is pressed in the tool bar and then manually closes t

Disable/hide minimize button

Does anyone know if you can disable or hide just the minimize button on a window? What I want is a resizable window which also has a maximize but not a minimize button. Thanks

How to cancel(disable) combobox in the time is under pressure button?

Hi I have one button and one combobox. How to do so that in time I press the button the combobox turn on be gray or freez. thanks 

disable postback on a button

Hey guys, I'm pretty new to asp.net and having some troubles.   I have a button whose sole purpose is to set  div.visible = true There is a calendar control on my page and I need the selected date to remain selected after I hit this button. Right now if I hit the button it refreshes the whole page and sets the calendar's selected day back to date. today   Any ideas?  

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

How to enable "Save" Ribbon from a webpart?

Hi there, I've created a webpart for PDP. This webpart will display/update custom fields value for project. However, when I put the webpart on the PDP page. The Save ribbon is not enabled (I clicked edit to check out the project pdp)..So how do I enable this Save Ribbon?..... Thank you,Joe

Using UserName to enable disable access to InfoPath form fields

Hi Everyone, I have created a browser enable form in InfoPath and restrict certain fields depending on the official logged on User Name. Now this works most of the time but my problem has to do with the "case" of User Names for some of the site users. In most cases the User Name is an exact match but for some reason, some user's names are reported by SharePoint (the Welcome at top of screen) with some parts captilized. Example - my hidden filed on the form reports my user name as xrs_master but the Welcome up top says XRS_Master - and the fields act as though I am not the correct user and won't enable. On the other hand there are users who's user name matches the case exactly and all works fine. Why is SharePoint reporting the user name differently? And if this is the reason they don't match, how do I fix it? Any Ideas? Many thanks in advance for help!

I need to be able to disable a button inside a repeater control when an item in the data is <1

For example, I have an inventory table. If any one of the items is less then one, I need to disable the button. <asp:Repeater id="repeater1" <ItemTemplate> <asp:Button id=btnSize /> </ItemTemplate> </asp:Repeater>  

Confirmation prompt when click on "save" button?

Currently I am working on SharePoint 2010 project that my customer want something like confirmation prompt, (e.g. upon click on “save” button, system prompts “are you sure you want to save?”) for all following 8 area: ·         Document Repository (meta-data) ·         Calendaring ·         News ·         Task List ·         Quick Links ·         Blogs ·         Wiki ·         Forums   Is this possible?  Has anyone done this or something similar?  Can anyone point me to some examples or best practices when doing this? Thanks Believing is Seeing

how to disable a button

Dear all; I have an If statement in my event button and I would to disable the button in the else part of the if statement. How do I do so.    

Is there a way to conditionally enable/disable a custom action

I've created a custom action that kicks off a workflow on an item in a list.  I want the workflow to be initiated only once.  So, once it is kicked off the first time, I'd like the custom action to be disabled so others cannot start it again. Is there a way to do this in Sharepoint Designer?
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