473,509 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to generate ok/cancel nutton in C# asp.net

11 New Member
hi all i need help about how to generate ok/cancel button in C# asp.net by using server controls not html coz my whole project is based on server controls
one thing imp is that when user click on the ok it work on the ok request and when it clicks cancel it works on specific piece of code thanx in advance its really very very urgent pl<removed several annoying 's'>s help
Sep 8 '08 #1
3 3292
Curtis Rutland
3,256 Recognized Expert Specialist
Drag an ASP.NET button onto the page from the Visual Studio Toolbox, and double click on it. Now you have added a server control button, and linked it to a method.

If you aren't using Visual Studio:
Expand|Select|Wrap|Line Numbers
  1. <!-- ASPX -->
  2. <asp:Button id="buttonIdHere" runat="server" OnClick="handlerNameHere" />
  3.  
  4. //c#
  5. private void handlerNameHere(object sender, EventArgs e)
  6. {
  7. }
  8.  
Replace handlerNameHere and buttonIdHere with whatever you need.

This is very basic, like ASP.NET 101. I suggest you go find yourself a good tutorial, because we can't be tutors here, we just help with specific problems.
Sep 8 '08 #2
jojee
11 New Member
Drag an ASP.NET button onto the page from the Visual Studio Toolbox, and double click on it. Now you have added a server control button, and linked it to a method.

If you aren't using Visual Studio:
Expand|Select|Wrap|Line Numbers
  1. <!-- ASPX -->
  2. <asp:Button id="buttonIdHere" runat="server" OnClick="handlerNameHere" />
  3.  
  4. //c#
  5. private void handlerNameHere(object sender, EventArgs e)
  6. {
  7. }
  8.  
Replace handlerNameHere and buttonIdHere with whatever you need.

This is very basic, like ASP.NET 101. I suggest you go find yourself a good tutorial, because we can't be tutors here, we just help with specific problems.
you might not read my problem thoroughly it does'n i need which u have posted
Sep 9 '08 #3
Curtis Rutland
3,256 Recognized Expert Specialist
you might not read my problem thoroughly it does'n i need which u have posted
Well, maybe you need to explain yourself better, because what I showed you is what your question asked for. Server controls refers to the <asp:whatever> tags.

Try to ask your question again, explaining more clearly what you want. Please try to use full sentences and correct English on this forum. Keep in mind that we won't write your program for you.

Please read the Posting Guidelines.

MODERATOR
Sep 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2611
by: Stefan Mueller | last post by:
I've a webpage with a dynamically created table. If the user presses F5, clicks on the reload button, ... the webpage reloads and the dynamically created table will be resetted. Is there something...
1
8300
by: AP | last post by:
Hi, I'm trying to use c# to pop up a dialog box when a user attempts to close word to prompt them if they want to exit or cancel (obviously other stuff needs to happen based on their selection...
13
2299
by: Mike L | last post by:
I have a child form frmDataEntry call up another child form frmDealerSearch. If the user clicks on cancel on frmDealerSearch, I want to close frmDealerSearch and put the focus on txtDealerNum on...
14
2606
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
3
2766
by: Charles Law | last post by:
Under what circumstances would e.Cancel be set to True on entry to the Closing event of an MDI child form? I have found that this is why my application won't close properly. I can explicitly set...
6
1469
by: Parasyke | last post by:
Thanks in advance! I have an un-secured database that I can see which computer name is logged-on but not the user. I have an error module that can get the user name. It writes to an error file. ...
2
635
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?...
1
1417
by: Perfectdark | last post by:
I have a form where the user can enter 2 Parameters. Now i want to automatically generate a Report according to these parameters. I'm making an SQL Statement and this needs to become the...
5
13570
by: ghjk | last post by:
I have "cancel" button in php files. I want to write common javascript function for cancel button. When user click cancel button I want to clear php form data. Is it possible? <input id="Cancel"...
0
7233
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
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
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
7505
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...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.