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
3 3302
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: -
<!-- ASPX -->
-
<asp:Button id="buttonIdHere" runat="server" OnClick="handlerNameHere" />
-
-
//c#
-
private void handlerNameHere(object sender, EventArgs e)
-
{
-
}
-
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.
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: -
<!-- ASPX -->
-
<asp:Button id="buttonIdHere" runat="server" OnClick="handlerNameHere" />
-
-
//c#
-
private void handlerNameHere(object sender, EventArgs e)
-
{
-
}
-
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
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 like an reload event
which I can test (e.g. with a JavaScript) and ask the user if he/she really
wants to reload the webpage and which I can cancel if the user says that
he/she doesn't want to reload the webpage?
Stefan
|
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 but that's the gist of it.)
I have everything set up, and it seems to work except that setting Cancel to
true and returning from my c# method appears to do nothing. Word still
closes. Am I doing something wrong?
private void...
|
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 frmDataEntry.
Here is my code.
public class frmDataEntry : System.Windows.Forms.Form
{
private void txtDealerNum_Leave(object sender, System.EventArgs e)
{
|
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 template which is not
such a bad thing in itself but it means all other controls in the
application must also be converted to templates to maintain a consistent UI.
So much for writing 70% less code when foolish morons release a control with
no cancel...
|
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 the value to False, but I would have expected it to be False
on entry.
TIA
Charles
| |
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.
What I'd like to do is to have an invisible error generated that would
post to this log, but do nothing else. Any ideas?
My error log works like this:
Call LogErr
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?
-----------------------------------------------------------------------
The buttons on a confirm box cannot be changed, nor can you
specify a default button. However, you should be able to change
the question so that "OK" is suitable as the default.
e.g. change "We will now buy ourselves...
|
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 recordsource of the report.
Here is what i have done so far:
Private Sub cmdPreviewReport_Click()
On Error GoTo Err_cmdPreviewReport_Click
|
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" src="Cancel.jpg" type="image" alt="cancel" onclick="Cancel('cancel');"/>
JS code
function Cancel(cancel){
if(cancel=='cancel'){
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |