473,395 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

asp.net 2 asp:Button firering anevent on client side and server si

i have a GridView with the next button :
Expand|Select|Wrap|Line Numbers
  1. <asp:TemplateField HeaderText="Delete?">
  2. <ItemTemplate>
  3. <asp:Button Text="X" ID="btnDelete" runat="server"
  4. OnClick="DeleteGame" OnClientClick="alert(1);" UseSubmitBehavior="false" />
  5. </ItemTemplate>
  6. </asp:TemplateField>
  7.  
i want when i pres the button to get a prompt which ask if i am sur i want
to delete, and if yes to send to a function
on server side called "DeleteGame" do some stuff

how do i do it?

thnaks in advance
peleg
Sep 1 '07 #1
1 1269
Check this out:
http://weblogs.asp.net/scottgu/archi...02/434362.aspx
--
More on ASP.NET and Silverlight on my blog: http://www.andreas-kraus.net/blog
"pelegk1" wrote:
i have a GridView with the next button :
Expand|Select|Wrap|Line Numbers
  1. <asp:TemplateField HeaderText="Delete?">
  2.                     <ItemTemplate>
  3.                         <asp:Button Text="X" ID="btnDelete" runat="server"
  4. OnClick="DeleteGame" OnClientClick="alert(1);" UseSubmitBehavior="false" />
  5.                     </ItemTemplate>
  6.                 </asp:TemplateField>
  7.  

i want when i pres the button to get a prompt which ask if i am sur i want
to delete, and if yes to send to a function
on server side called "DeleteGame" do some stuff

how do i do it?

thnaks in advance
peleg
Sep 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RSB | last post by:
Hi Every one, Having tuff time to make this work .. i want to have a button and on my form say Delete button. So once i click on it i want to confirm "Are you sure?" on the Client Side and if...
3
by: Jeff | last post by:
I need to intercept the Click event of a asp:Button on the client side so that i can disable it after they've clicked it... HOW can i do this?? I was thinking of making the button an HTML button...
2
by: giant food | last post by:
Hi, I'm writing an asp app. I have a text box with a validator and a submit button. Here is code from my .aspx file.... <asp:TextBox ID="txName" TextMode="SingleLine" Runat="server" />...
3
by: Charlie | last post by:
Hi: when the user selects the save button (asp control) to intiate a postback, I would like to pop up a javascript alert box to confirm if he really wants to save. If he selects no from alert...
2
by: Novice | last post by:
Hi all, as you can see from the subject, I'm try to use an asp:button to create a new browser window and output contents to new window But default if I do the Response.Write("..." The output...
2
by: Ed Chiu | last post by:
Hi, I would like to add a <asp:button> to a webform. When user click on this button, the page will connect to SQL server and update tables, then the browser window will be closed. I know how...
4
by: Roy | last post by:
Ok, I feel silly asking this because it seems like such a simple thing but I haven't been able to figure it out. Is it possible to create an asp:button that functions just like an asp:linkbutton?...
2
by: Opa | last post by:
Hi, I have a asp:button which allows a user to delete a record, and I wish to prompt them with a client side confirmation. The javascript confirm messagebox does show and the cancel button is...
4
by: Sean | last post by:
I have a situation whereby I need to modify the text string appearing on an ASP button with some text derived from a Javascript function. But I am unsure of the correct syntax to do so. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.