Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help and Advice

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dear All,

I need some help regarding the following problem:

I'm inserting a record to table (Access or Sql Server) in Same Asp after submitting to it. When ever i refresh the ASP using refresh button from browser it's adding new record to the table. How can i over come this problem?.
I'm using auto counter as ID (primary key for the table).

Thanks is advance.

Sathya
 
What you need to do is check if the form was actually submitted, or if the ASP page is just loading for the first time. To do this, just check if one of the form elements exists:

Code:
<%
    if request.form(&quot;some_field&quot;) <> &quot;&quot; then
        ' Insert record
    end if
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top