|
-
Feb 23rd, 2005, 05:36 PM
#1
Thread Starter
Addicted Member
help with insert record please
in a typical insert new record web page coded using asp.net...
If user click "refresh" button in the web browser too bar, then it automatically insert a new record.
I don't like this, How can I only add new record when user click insert button on my web form?
thanks
-
Feb 23rd, 2005, 06:42 PM
#2
Re: help with insert record please
 Originally Posted by redshirtme
in a typical insert new record web page coded using asp.net...
If user click "refresh" button in the web browser too bar, then it automatically insert a new record.
I don't like this, How can I only add new record when user click insert button on my web form?
thanks
Check for the IsPostBack property in the Page_Load event
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Feb 24th, 2005, 03:48 PM
#3
Thread Starter
Addicted Member
Re: help with insert record please
I found the solution through asp.net forums.
response.redirect to the same page will do the trick!
-
Feb 24th, 2005, 05:39 PM
#4
Re: help with insert record please
 Originally Posted by redshirtme
I found the solution through asp.net forums.
response.redirect to the same page will do the trick!
Yep that should do it too, but best practice and safe thing to do is only add rows if there has been a PostBack.
Glad you found the solution.
Good luck, happy coding..
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|