Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > button evet ---- server side - client side ???

Reply
Thread Tools

button evet ---- server side - client side ???

 
 
yaya coco
Guest
Posts: n/a
 
      07-04-2003
I want to use button. My question is that
How can use server side and client site event at the same time.
That is:

I want to use button :
when The user click the button first of all, client side ask question "Are U
sure"
If yes then send server side function ?

Button Like this
<asp:button id="btnDelete" onclick="delFunction" runat="server">

How can I do that?



 
Reply With Quote
 
 
 
 
Rajesh Tiwari
Guest
Posts: n/a
 
      07-04-2003
run this code and you will get the answer

<%@ page Language="C#" debug=true %>
<script language="C#" runat=server>
void Page_Load()
{
bt1.Attributes["onClick"]="javascript:return confirm('are u sure')";


}
public void abc(Object o,EventArgs e)
{
l.Text="Server Side Function called";
}
</script>
<form id=frm1 runat=server>
<asp:Button id=bt1 runat=server onClick="abc" Text="Submit" />
<asp:Label id=l runat=server/>
</form>

hope it helps
Rajesh

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button disabled and re-enabled in client side not firing server-side click event. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?= ASP .Net 2 05-27-2008 09:57 AM
Making the same button do client side javascript and server side vbscript? COHENMARVIN ASP .Net 2 10-20-2005 01:13 AM
How to call a client-side vbscript from server-side button alan ASP .Net 2 09-15-2005 04:58 PM
Bluetooth, send msg from soft key evet. Boki Java 5 03-26-2005 04:06 AM
Calling client side Javascript from a server side button =?Utf-8?B?Qw==?= ASP .Net 1 01-16-2004 05:56 PM



Advertisments