alert box in asp.net web application - asp.net

how can i use an alert box in asp.net web application without using javascript with Yes/NO option, much like messagebox in desktop (windows) application.
Thanks

Simple, you can't. That message box object is only for WinForms Development.

You can't create one - although you could make it look like one by using an overlay div and "message box" div. The additional content would need to be controlled on the server so it would require a POST request to the server when displaying and another for submitting the Yes/No click.

Write an ActiveX control?
(Please don't do that.)

Related

Why web controls does not have sufficient events like windows application?

Hai , An asp panel contains only 6 events. if they provide a visibilechanged event it may very useful for me. if it is in windows application ,how easy it is.I dont know why thy are not providing all these.This is same as in the case of gridView, button ,etc.
just think , I have an Iframe in an asp panel and two buttons. In first time it is invisible .Buttons named first and second respectively. Two another pages One.aspx,two.aspx. These two pages contains each text box. When you click on the First button . I want to set the Iframe src="One.aspx" and display "first" in the textbox on One.aspx. as same in the case , when user clicks Second button. How to do this ?
Web technologies work quite differently than Desktop technologies.
Desktop technologies can directly talk to native OS and hence they are functionally more rich.
In case of web technologies, the application runs on a web-browser which is independant of server-side web technolgy and vice-versa. Both the server and the web-browser talk using Http which is stateless transport service.
Some technolgies like Flex, Silverlight and WPF browser applications have gone beyond the browser limitations and they have become much more rich compared to traditional web-apps.
WPF browser apps and Silverlight are bridging this gap very fast.
Er, its quite hard to understand your disjointed sentences, but it sounds like you just want to handle the button clicked event.
In Visual Studio, in design view, double-click the button and it will generate the click handler event for you.

Are there any AJAX NON-MODEL message box in ASP.NET Web Control?

I am looking for some popup message / reminder like this and that, in a ready to use control in ASP.NET.
PS. For some reasons, I am forced NOT TO WRITE ANY JAVASCRIPT. I can use only Web Controls.
Have you looked at the AlwaysVisible control in the AJAX Toolkit? That's the closest to the SO notification bar that sits at the top that I'm aware of, although there are undoubtedly others.

How do I build a popup dialog in asp.net

I am building a Web Application using asp.net (C#). I come from windows forms development and find myself in a hard spot. Im making an application where the user should edit some simple information about himself, and thus i need to create a new dialog. How do I do that in asp.net? I have a button which event is handled serverside, and when i click lthis button i want to popup a dialog where i can show my custom web control (or any web control, lets make it generic from the start). How do I go about with doing so?
I got some part of the way by looking at the internet, that i need to make a section and set the z-index to 1000, but how do i make it visible (block)? Please help here as i am completely lost...
/H4mm3rHead
If you're not concerned about using a library, try Microsoft ASP.NET AJAX Control Toolkit, they have several controls that can create something you want (the ModalPopup control).
The AJAX Control Toolkit has a ConfirmButton extender which will do exactly what you are looking for.
I used to do the following:
1. my new pop up is just a new aspx page like any other page
2. add a button (or just a link) that fires a client side java script function
3. in the function I use window.open and put params to open my popup page with no toolbars or scrollbars and proper size to its content
check this for more info on #3

I want to make UI such as the select box + text box

Nice to meet you. I developed Windows application with VisualStudio so far.
It was these days and has begun to do the Web application.
Therefore there is a question, but will there be UI which added a select box and text box in HTML?
Though it can choose some choices, it is a thing to have the direct input if there does not have it.
It is the guy who seems to be the URL input area of a place saying in FireFox and IE.
A past history appears here with a list like a select box and can input it directly.
When there was such a demand, how should it have been settled?
Will it be a feeling to arrange a select box and text box?
If your using ASP.NET Ajax check out the AJAX Control Toolkit ("ACT"), it has a ComboBox control. Very easy to use and a demo online here.
What you need to learn about are ASP.NET User Controls; these are custom components wherein you can combine standard ASP.NET controls in one component and use them for your ASP.NET application.
Sounds like you want a ComboBox control, but is this for ASP.Net or Winforms?

Client side modal dialog in asp.net from the server side code. (how do I do this)

I need a technique for dealing with what seems pretty simple!
I have a form, with some logic on the server side for validation.
if the server side code indicates that there is an issue, I want to display a modal popup to the client.
I am having trouble getting it to work in this way.
I found if I keep all the logic client side, I can use the javascript function
window.showModalDialog("url","title", "style");
However the logic is currently on the server side.
this is an ASP.NET 3.5 web project - is there some way to do this using AJAX controls like the scriptmanager, an update panel etc?
Thank you!
I know that you do it using the ScriptManager control. Basically you just send from the server a line of JavaScript to execute immediately. In this case, the client side line you describe.
Sorry to be vague, but it's almost quitting time and I'll have to grep through a lot of code to find an example.
Here is an example
Beware that modal dialogs are not supported in all browsers.
You may be able to accomplish something similar using DHTML and setting the visibility of divs from the server side if your server side validation fails.
You might also look at Telerik's RadWindow control which was designed (in part) to solve the modal dialog problem.
You need to use an AJAX callback to perform your server side validation and return a response to the client - then decide whether to display the modal dialog... however, why do you need to validate on the server? It is usually best to try and validate in the client to save roundtrips...
You really shouldn't use the modal popuper. First of all it mstly works only in IE. Second of all it's REALLY annoying for your end users...
You should rather use something like e.g. this;Ra-Ajax Clendar Starter-Kit (click the "Create New Activity" in the bottom left corner)

Resources