WingYip
asked on
Linkbutton server and client events
csharp asp.net 4
I have a linkbutton.
On click I insert some values into a database on server but on the client side I need to open a PDF file in a new window.
How can I achieve this?
Wing
I have a linkbutton.
On click I insert some values into a database on server but on the client side I need to open a PDF file in a new window.
How can I achieve this?
Wing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<asp:LinkButton runat="server" ID="lnkButton1" OnClick="ServerSideMethod"
On the Server side you can do any server side processing you need, and then in the OnClientClick attribute, you give it the name of the javascript function you would like to call. Have that javascript function open your pdf in a new window.