Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am just bearly learning asp.net and need some help

 

I have created a simple form that inserts rows into an sql database.

The Problem is when ever I hit the refresh button it also inserts a row.

Is there an easy fix for this.

  • Moderators
Posted

Yeah, remove the insert routine from your page load event :) , however, if you need it the first time a person visits the page then wrap your routine with the following code...

 

if not IsPostBack then

LoadInsertMyData()

end if

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...