on click of a link button should first save the data and then open a new browser

M

Mathew George

Hi,

A page consists of a link button. Clicking this link button should first
save data in the database.
If the data is saved correctly then it should open a new window.

I have coded for the link button as

Private Sub Button1_Click
(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
' perform database save here
Response.Write("<script>window.open();</script>")
End Sub


Can anyone suggest which is the best method in terms of reliability and
performance.

Regards,
Mathew
 
S

soni

Hi mathew..
well it looks fine.. as long as u r not doing any major DB work in the
button _onclick event. ( this should be done in ur middle tier)
the rest looks fine unless someone differs ..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top