message box in asp.net

13 views
Skip to first unread message

vikalp

unread,
May 10, 2008, 2:03:07 AM5/10/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
hi everybody,

actually i am trying to include a message box in my asp page....but
its not there...how can i include that???
plz help...

regards
vikalp

Cerebrus

unread,
May 10, 2008, 3:20:13 AM5/10/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
If you're looking for something akin to the Windows forms MessageBox,
then you are quite right... it's not there. Browser message boxes are
different and require Javascript invocation.

Here is a beginner page for Javascript alerts :

http://www.aspnetcenter.com/cliktoprogram/javascript/alert.asp
[Scroll to bottom]

scandan K

unread,
May 10, 2008, 2:54:37 AM5/10/08
to DotNetDe...@googlegroups.com
use javascript alert();


2008/5/10 vikalp <bhatt....@gmail.com>:



--
Scandan K.
Perumbavoor.

vikalp

unread,
May 10, 2008, 4:41:48 AM5/10/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
hi,
well,thanx a lot Cerebrus for spending your valuable time on my
question.The thing is that debug window is also not coming.i tried my
level best.can u tell me why its not coming.and one more thing i am
doing the coding in c# and can i use javascript invocation to include
Messageboxes in my webform or else what is the possible way..
thanx
best regards

rafic.

unread,
May 11, 2008, 5:54:29 AM5/11/08
to DotNetDe...@googlegroups.com
hi,

u just use ajax toolkit control. in this toolkit having more controls like msgbox.

here is a asp.net ajax control toolkit link :
http://www.asp.net/ajax/ajaxcontroltoolkit/

Jamie Fraser

unread,
May 12, 2008, 4:53:44 AM5/12/08
to DotNetDe...@googlegroups.com
I think you need to learn the fundamentals of ASP.Net before you go
ANY further.

srihari k

unread,
May 12, 2008, 6:56:36 AM5/12/08
to DotNetDe...@googlegroups.com
   write a Javascript method in .aspx page
 
   put the below code inside method :
 
        alert('You must select a result by clicking on one of the radio buttons.');
 
   Call the Javascript method on click of button in .aspx page
 
- Srihari.

 

vikalp

unread,
May 11, 2008, 2:37:58 PM5/11/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
hi,
well i downloaded that ajax toolkit control..but the problem
persists..and 1 more thing iam trying to insert a record in database
table by using various textboxes.but iam not getting the desired
output.iam mean table in the database is not populating.here is the
code.

string s3="";
string s4="";
string s5="";
string s6="";
string s7="";
string s8="";
s3=this.TextBox1.Text;
s4=this.TextBox2.Text;
s5=this.TextBox3.Text;
s6=this.TextBox4.Text;
s7=this.TextBox5.Text;
s8=this.TextBox6.Text;
string select2 = "insert into
passenger_reservation(passenger_name,age,sex,from_station,to_station)
values('"+s3+"'.'"+s4+"','"+s5+"','"+s6+"','"+s7+"','"+s8+"')";

OR

string select2 = "Insert into
passenger_reservation(passenger_name,age,sex,from_station,to_station)
Values('" + TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text +"','" + TextBox4.Text + "','" + TextBox5.Text + "')";
SqlCommand cmd = new SqlCommand(select2,conn);
cmd.ExecuteNonQuery();

i dont understand where iam getting wrong...when i build and run it
doesn't show any error..but data is not populating..also when i check
the values of s3,s4 etc by putting a breakpoint there values are very
well coming...but only thing is they are not getting into table...plz
help
thanx regards
vikalp


On May 11, 2:54 pm, rafic. <raficm...@gmail.com> wrote:
> hi,
>
> u just use ajax toolkit control. in this toolkit having more controls like
> msgbox.
>
> here is a asp.net ajax control toolkit link :http://www.asp.net/ajax/ajaxcontroltoolkit/
>

Andrew Badera

unread,
May 12, 2008, 8:13:23 AM5/12/08
to DotNetDe...@googlegroups.com
Before jumping onto the Ajax bandwagon, you need to buy yourself a clue on the technologies involved in general.
--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

Jamie Fraser

unread,
May 12, 2008, 8:41:57 AM5/12/08
to DotNetDe...@googlegroups.com
Read my post above.

What you've done is akin to jumping in a Formula 1 car before you've
got your drivers license.

Cerebrus

unread,
May 12, 2008, 12:08:20 PM5/12/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I agree totally ! AJAX isn't even required in this scenario.

Crisatunity (blog.crisatunity.com)

unread,
May 12, 2008, 3:17:46 PM5/12/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
But Cerebrus I want database exceptions thrown to be presented nearly
real-time, *with dump stacks* to my end users. How will I do that
with long running transactions without AJAX?
> > got your drivers license.- Hide quoted text -
>
> - Show quoted text -

Andrew Badera

unread,
May 12, 2008, 3:23:05 PM5/12/08
to DotNetDe...@googlegroups.com
bwahaahahahahahahahahahahahahahahaha

funniest thing I've heard or read all day.

Rod

unread,
May 12, 2008, 11:54:36 PM5/12/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hey mate,

If you are trying to include a message box so that you can do some
debugging (you mentioned debugging), instead add this:
System.Diagnostics.Debug.Print("Message goes here");

then hit f5 from visual studio to start the debugger.
when your code hits that point, it will be written to the visual
studio window.

In terms of pop up messages if you want them for your users its a
javascript alert();
you can't write it in c# but it depends on how you are writting your
code of how to use it.

CK

unread,
May 13, 2008, 7:51:19 AM5/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
ok......

you need to think about the overall architecture here.

If the user is hitting a button on a page that fires off a long
running process, what happens then?
Does the process run asynchronously, letting the user go to other
pages etc, in which case, how do you handle database locking if this
is a database related system with transactionalised updates?

If you are not running asynchronously, then the user will have to wait
until the process is finished. In that case, if there is an error
then you can display it to the user in an error page.

If you do want to display something with asynchronous processing, then
you have a few options.

1. Store the processing details in a DB table and have a page that can
display it that the user can visit to find out the progress.
2. Store the processing details in a DB table and show a notification
at the top / bottom / side / middle of the page when anything
changes / a certain state is reached
3. Poll the process on each page refresh / AJAX UpdatePanel refresh to
check for status changes.#

Enjoy!


On 12 May, 20:17, "Crisatunity (blog.crisatunity.com)"

Cerebrus

unread,
May 13, 2008, 1:12:32 PM5/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
*Echo*

vikalp

unread,
May 13, 2008, 2:17:53 PM5/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
thanx rod and ck,,,,u people really helped me alot...i hope my code
will run now..thanx once again...have a gud tym
Reply all
Reply to author
Forward
0 new messages