Message Box Facility in ASP.NET
-
hi all, i want to have functionality of message box like VB.NET, but i don't know the syntax for that in asp.net. what and how should i write that in code behind section. i just know that the statement will be in javascript. but i don't know where and how to write it. suppose, if i want to display messagebox in action event of any button, what code should i write in its event handler. And how can i perform action event on that message box. That is, if i want to have yes/know kind of message box, what will be the values of the buttons on that message box please help me it's urgent.
-
hi all, i want to have functionality of message box like VB.NET, but i don't know the syntax for that in asp.net. what and how should i write that in code behind section. i just know that the statement will be in javascript. but i don't know where and how to write it. suppose, if i want to display messagebox in action event of any button, what code should i write in its event handler. And how can i perform action event on that message box. That is, if i want to have yes/know kind of message box, what will be the values of the buttons on that message box please help me it's urgent.
The javascript alert(message) function causes a message box to pop up on the client side. For a yes / no, use the confirm function.. The problem that you'll run into is that a) can't call javascript from a codebehind, and b)if you use Messagebox.show, it will only appear on the server! What I usually do is hook the event handler up on the client side in javascript, do my processing there and if I desperately need to go to the server, use AJAX.... Happy to help further if you're stuck.. "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
-
The javascript alert(message) function causes a message box to pop up on the client side. For a yes / no, use the confirm function.. The problem that you'll run into is that a) can't call javascript from a codebehind, and b)if you use Messagebox.show, it will only appear on the server! What I usually do is hook the event handler up on the client side in javascript, do my processing there and if I desperately need to go to the server, use AJAX.... Happy to help further if you're stuck.. "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
-
Hey, thanks for suggestion. but it would be beneficial to me if you write a small sample code snipet, because, if i want a handler for a button, and if the language is javascript, i dont know where and how to write that. please help.
will tie the click event to the js function - just define as any js... (note there should be a colon between "javascript" and "functionToCall", but keeps ripping it out when I post!) email me if still struggling "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox
-
will tie the click event to the js function - just define as any js... (note there should be a colon between "javascript" and "functionToCall", but keeps ripping it out when I post!) email me if still struggling "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox