473,395 Members | 1,681 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,395 software developers and data experts.

displaying alert box

hi,

plz can any one say how to display the value of a particular varible in c# alert box?

for eg, if int x = 10
then
response.write("alert('what should i write to display the value of x')");
Sep 6 '11 #1
2 2043
Hi,
Please find the below code.

Expand|Select|Wrap|Line Numbers
  1. int x = 10;
  2. string script = "<script> alert('" + x + "')</script>";
  3. Response.Write(script);
Thanks,
Snehasis
Sep 7 '11 #2
Frinavale
9,735 Expert Mod 8TB
You should check out the article about How to use JavaScript in ASP.NET

-Frinny
Sep 8 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: hugo2 | last post by:
Most of these characters are not on the standard keyboard. Here's a successful contrivance, with comments & cautions, a little page that works in IE6. <HTML><HEAD><SCRIPT TYPE="text/javascript">...
3
by: John | last post by:
hey guys this may not be possible, but i have an if statement that checks to see if a value returned by a sql query is null or not..if it is i execute the right code if it has a value i need to...
5
by: debbiedchang | last post by:
Hi, I have a custom user login authentication page. There are times when the login authentication succeeds, but before I redirect to the home page, I want to display a popup with a warning message...
5
by: Shaileshsharma | last post by:
Hi, I am displaying message in c# like this Response.Write("<script>alert( 'Sum is 50' )</script>"); it is working fine,but it is not working when we take variable in aleart like int a=25;...
3
by: geevaa | last post by:
Hi All, Using javascript i am displaying an alert... Is there is a way to change the title of the alert box displayed through Javascript Here is my simple javascript code <script type =...
19
by: RossGK | last post by:
I'm a bit new to javascript - as will be obvious below. I'm using an XMLHttpRequest to get a bit of data from server (django), and it works nicely for single events. But my eventual outcome...
23
by: Marge | last post by:
This may be in the wrong forum, but here goes. How can I display an alert in the users browser window from an asp page. For example, a welcome message. I know I can do this with response.write,...
0
by: Anupam Jana | last post by:
Hello All, I want to redirect to some other directory page after displaying JavaScript alert message in ASP.net in a page. For that I tried bellow code in our application...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.