|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MessageBoxSystem.Windows.Forms.MessageBox.Show works when running on the server. It does not work when I actually upload my web site to the web server. That is really annoying! I wish it would not work in the debugger! Things should not work differently like that. Anyway, I am looking for alternatives. I can do something like: Response.Write("<script>alert('hello');</script>"); from the server side, but I cannot specify the title, and there is no return value. Yes/No MessageBoxes are useful! Is there any better option? I really would like something that can be launched from the server side that displays some text and can post back some kind of result. Is that possible? BTW, I don't think that I've seen a mention of the ASP.NET faq at: http://www.syncfusion.com/faq/aspnet/default.aspx That really is a useful document. -John John Baima wrote:
> When I run my ASP.NET app in the debugger, You're writing an *ASP.NET* application, and you use a UI element from> System.Windows.Forms.MessageBox.Show works when running on the server. > It does not work when I actually upload my web site to the web server. > That is really annoying! I wish it would not work in the debugger! > Things should not work differently like that. > under the System.*Windows.Forms* namespace, and you expect it to work?</sarcasm> > Anyway, I am looking for alternatives. I can do something like: The only ways to get something new to appear on the client side in> > Response.Write("<script>alert('hello');</script>"); > > from the server side, but I cannot specify the title, and there is no > return value. Yes/No MessageBoxes are useful! Is there any better > option? I really would like something that can be launched from the > server side that displays some text and can post back some kind of > result. Is that possible? > response to a server side decision is to inject script, as you've shown above. Your options are alert(), confirm() or to inect an HTML form which targets _blank and use your script to submit the form (you can do this if you need really rich content in your popup box). Of course, if you need to know the result of the confirm() on the server side, you'll have to have more javascript which sets a hidden form input and then submits the ASP.Net form. I believe some people have created frameworks which hide a lot of the detail of this for you. Damien "Damien" <Damien_The_Unbelie***@hotmail.com> wrote: Well, no, I guess not. But I wanted that functionality, so I tried it,>John Baima wrote: >> When I run my ASP.NET app in the debugger, >> System.Windows.Forms.MessageBox.Show works when running on the server. >> It does not work when I actually upload my web site to the web server. >> That is really annoying! I wish it would not work in the debugger! >> Things should not work differently like that. >> >You're writing an *ASP.NET* application, and you use a UI element from >under the System.*Windows.Forms* namespace, and you expect it to >work?</sarcasm> and it did work when I was debugging. Why is that?? > Links? Thanks.>I believe some people have created frameworks which hide a lot of the >detail of this for you. -John "John Baima" <john@nospam.com> wrote in message Presumably because you're development box has a local copy of IIS, so it's news:k1v2g2le1m0fkr9qlocfe14a7ohubtdbsn@4ax.com... > Well, no, I guess not. But I wanted that functionality, so I tried it, > and it did work when I was debugging. Why is that?? both server and client... >>I believe some people have created frameworks which hide a lot of the Google...>>detail of this for you. > > Links? |
|||||||||||||||||||||||