473,385 Members | 2,210 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,385 software developers and data experts.

how to execute an 'Alert'-windows within vb?

Ben
Hi,

When a user wants to start the application, aspnet checks a boolean value in
a field of the database.
If that value is 'false', then i want to execute a ALERT in javascript
telling the applicatin is closed.
This is a part of the .aspx.vb file:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
....
dtreader = comd.ExecuteReader
dtreader.Read()
myvalue = dtreader.GetValue(0)
dtreader.Close()
If start = False Then
...... alert("application is closed")
...... window.location.href="http://mywebsite/"
else
......
End If
May 15 '06 #1
2 4208
In c#

Response.Write("<script
language='javascript'>alert('hello');</script>");

Ο/Η Ben *γραψε:
Hi,

When a user wants to start the application, aspnet checks a boolean valuein
a field of the database.
If that value is 'false', then i want to execute a ALERT in javascript
telling the applicatin is closed.
This is a part of the .aspx.vb file:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
...
dtreader = comd.ExecuteReader
dtreader.Read()
myvalue = dtreader.GetValue(0)
dtreader.Close()
If start = False Then
..... alert("application is closed")
..... window.location.href="http://mywebsite/"
else
.....
End If


May 15 '06 #2
Ben
Thanks, i'll try...

<ma******@gmail.com> schreef in bericht
news:11*********************@i40g2000cwc.googlegro ups.com...
In c#

Response.Write("<script
language='javascript'>alert('hello');</script>");

?/? Ben ??????:
Hi,

When a user wants to start the application, aspnet checks a boolean value
in
a field of the database.
If that value is 'false', then i want to execute a ALERT in javascript
telling the applicatin is closed.
This is a part of the .aspx.vb file:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Handles Me.Load
...
dtreader = comd.ExecuteReader
dtreader.Read()
myvalue = dtreader.GetValue(0)
dtreader.Close()
If start = False Then
..... alert("application is closed")
..... window.location.href="http://mywebsite/"
else
.....
End If

May 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jess ngel | last post by:
Hello. I have a javascript object with one attribute (name) and one method (showName). Each object instance appends a DIV to the document's body. I want that when the user clicks over the DIVS...
2
by: jm | last post by:
I have a parent window: <script language="javascript"> function doSearch() { result=showModalDialog("searchmni.aspx?lastname=smith"); alert(result); } </script>
1
by: Michael SL | last post by:
Here is my problem. I have a delete record button. I want to prompt the user "Do you really want to delete?". If the user clicks 'OK' then I want to execute the CodeBehind on the server side to...
4
by: Bundy | last post by:
I am trying to create a function that executes all the functions listed in an array. I cannot get it to work. <html> <body> <script language="JavaScript"> var length_of_array = 2; var...
1
by: marcyb | last post by:
I need this to charge sales tax on if oklahoma resident is checked <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
8
by: M.L. | last post by:
Hello. I created a form using JS validation with the form tag as follows: <form name="form1" action="dynaform.php" method="post" onsubmit="return pvg_sub();"> The js validation script sends...
3
by: pablosuk78 | last post by:
Dear coders, I'm facing a problem and after few research I found that many ppl were looking around for the same solution, hope someone more expert than me could give a good help. I created an...
16
by: perdeepOsingh | last post by:
Hi, What I am trying here is that from my first file I am making a call to handler.php file //////////////////////////////FirstFile//////////////////////// <html> <head> <script...
7
by: Peter | last post by:
I have a HoverMenuExtender which contains an asp:PlaceHolder, this place holder has a User Control and this control contrains a Button. The problem I am having is after the button fires the click...
1
by: Ernie13 | last post by:
Hi everybody, I've Googled some hours now to find a solution, but I'm really stuck. This is my situation: I have a <div id='content'> where the content is loaded with Ajax, and some buttons...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.