cpopham Posted August 7, 2004 Posted August 7, 2004 I thought that if I had a checkbox, when it is clicked, it should postbaclk to the server. It is not working like that though, when you press the update button, then the checkbox is checked and the update to the form view is changed according to the checkbox. I want the change to take effect when the checkbox is clicked on like a windows app. Any ideas? Thanks, Chester Quote ____________________________________________ http://www.pophamcafe.com I am starting a developers section, more tutorials than anything.
bungpeng Posted August 7, 2004 Posted August 7, 2004 I not sure what are you doing to do, but look like you need to use "javascript" to do that Quote
irasmith Posted August 7, 2004 Posted August 7, 2004 You might want to look in the properties area when you have the check box in focus and check to see what the AutoPostBack is set to. I am just starting to work with ASP.NET and C#, and noticed that is an option you have when you place a checkbox on the webform. Naturally though I'd be careful about doing this since when the box changes you take a hit back to the webserver to update things. Hope this helps out, and like I said, just working on learning this stuff myself so if I have spoken incorrectly those more knowledgable will have to let me know. Quote Ira Richard Smith IraRichardSmith.Net
egdotnet Posted August 8, 2004 Posted August 8, 2004 You might want to look in the properties area when you have the check box in focus and check to see what the AutoPostBack is set to. I am just starting to work with ASP.NET and C#, and noticed that is an option you have when you place a checkbox on the webform. Naturally though I'd be careful about doing this since when the box changes you take a hit back to the webserver to update things. Hope this helps out, and like I said, just working on learning this stuff myself so if I have spoken incorrectly those more knowledgable will have to let me know. i'm not sure where your code is, but after a postback, what you want it to do then should go back to the page_load sub. it's really confusing, but try that. Quote
Tamer_Ahmed Posted August 9, 2004 Posted August 9, 2004 the default value for checkBox' autopostBack property is false change it to true from the property window Quote
cpopham Posted August 10, 2004 Author Posted August 10, 2004 Thanks, I have it working now.... I am still learing ASP .net and am reading up on it. Chester Quote ____________________________________________ http://www.pophamcafe.com I am starting a developers section, more tutorials than anything.
samsmithnz Posted August 10, 2004 Posted August 10, 2004 i'm not sure where your code is' date=' but after a postback, what you want it to do then should go back to the page_load sub. it's really confusing, but try that.[/quote'] everytime you post back it automatically uses the page_load event, so you don't have to do anything special (except probably add a "if not page.ispostback then" if statement to the top of the sub) Quote Thanks Sam http://www.samsmith.co.nz
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.