473,396 Members | 1,942 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,396 software developers and data experts.

Javascrit conformation ok button click event in code behind of c#.net

2
I have a master page and a content page in my web page(.net 2008).In the master page i am having some menus.Now after doing some operation in the page if i will click to any other menu then it should ask the conformation by javascript.On cancle it should close the window but in case of ok button click it should save the changes.(I mean want to call the save method in that ok button click)

So can u plz guide me how can i get the event of the javascript conformation ok button click in the c# file.(code behind).Reply me as soon as possible ....................



Thanks
Aawhan
Mar 24 '08 #1
1 3909
pronerd
392 Expert 256MB
So can u plz guide me how can i get the event of the javascript conformation ok button click in the c# file.(code behind).Reply me as soon as possible

I am not sure if this is what you are asking. It this a web app, or some sort of C# client GUI?

If you just want to pick up the onClick event from an HTML button then it would just be something like :

Expand|Select|Wrap|Line Numbers
  1. <input type="button" onClick="alert('OnClick Event triggered');" name="Click Me" />
You would just replace the alert() call with the confirm() or other function call you wanted the even to trigger. Is that what you wanted?

If you are wanting to pass an event or value from JavaScript to C# I do not think you can without doing an HTTP POST or GET request. JavaScript is a client side language and C# is server side they can not share values directly.
Mar 24 '08 #2

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

Similar topics

5
by: Carlo Marchesoni | last post by:
From an aspx page (A.aspx) I open another one (B.aspx - for table lookup). When the user selects an entry in B.aspx I would like to force a button's event in A.aspx to be fired. I guess the only...
5
by: Steve | last post by:
Hi, Is it possible to make hitting the enter key in an ASP textbox run the code behind an ASP button on a form? I have a search page which users tend to type in the query then just hit enter...
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
4
by: Bob | last post by:
Hi, I'm working with VWD and i defined programmatically a button (in code-behind) with an ID. So I expect to see beside "Page Events" and "Form1" my button "b1" in order to use the Click event....
1
by: Mateo | last post by:
Hi! Let's say You generate button from code. Web forms control, not HTML button. How can I catch it's OnClick event? Where to put code which is exedcuted on buttons OnClick event? Thanx! ...
1
by: aawhan | last post by:
I have a master page and a content page in my web page(.net 2008).In the master page i am having some menus.Now after doing some operation in the page if i will click to any other menu then it should...
1
by: ganesh22 | last post by:
Hi, my requirement is while click the submit button i want to give the conformation that means "Plz check all fields r currect" if ok we can modifie there another button is proceed if i click that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
agi2029
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,...

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.