Link Button

Phillh

Member
Joined
Apr 2, 2003
Messages
7
Location
Cirencester
Hi all

I have a link button which I use on a webform to submit the data entered to a SQL database which works fine...

I want the button to also link to a page after the submit which says "Your entry has been submited" etc etc and display it...

I have the page built just need to know how to display it using the linkbutton as oppsed to the hyperlink control which I cant use as I need to run the click_event fist.

Thanks for your help..

Phill :)
 
You could always convert it to a standard Button with a transparent background and no borders. This gives a standard submit button the appearance of a link button in ie 4.0 or higher, but allows you to add click events to your event handler. You can fire your stored procedure, then link to the next page within the sub. Example:

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSubmit.Click
lblErrorMsg.Text = String.Empty
SaveDealerInfo()
Response.Redirect("Default.aspx")
End Sub

It clears any error msgs, then update the vehicle record and redirects them backto the beginning (or wherever you want them to go).

-Hotdog
 
Back
Top