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

Displaying a message box in asp.net using c#

I am returning a boolean value from a function and based on this boolean value i would like give the user a message which says the request is granded or denied.........
Mar 28 '07 #1
6 2204
dip_developer
648 Expert 512MB
I am returning a boolean value from a function and based on this boolean value i would like give the user a message which says the request is granded or denied.........
store the value returned by your function in a hidden textbox.....
now after checking the value from the textbox you can show a pop-up window through Javascript window.open() function.....
Mar 28 '07 #2
Thank you for ur reply....but still i am not clear abt hw will i show a message box and i am not using javascript......is thr anyother way out????
Mar 28 '07 #3
I'd like to know how to display a message box (giving information whether a record has been deleted or not) in C#. that is without writing code in the ASP.NET part. I call a function to delete the record which returns a bool value (true if delete successful else false). So i need to write code in C# to be able to use the return value right? help me out! thanx.
Mar 28 '07 #4
dip_developer
648 Expert 512MB
Thank you for ur reply....but still i am not clear abt hw will i show a message box and i am not using javascript......is thr anyother way out????

without javascript you cannot have a messagebox.....you can use Javascript Alert() function also instead of window.open.......
Mar 28 '07 #5
ok... considering my scenario... how do I use javascript to display a message box (using alert) based on a boolean value... that is if it is true the message box pops up, else it doesn't.
Mar 28 '07 #6
dip_developer
648 Expert 512MB
ok... considering my scenario... how do I use javascript to display a message box (using alert) based on a boolean value... that is if it is true the message box pops up, else it doesn't.
1.keep your Boolean value in a hidden textbox...

Expand|Select|Wrap|Line Numbers
  1. txtHiddenValue.Text=MyFunction()
2.In your Form_Load() event add onclick attribute(or any event where you want to show your message)

Expand|Select|Wrap|Line Numbers
  1.  btnSubmit.Attributes.Add("onclick", "javascript:showMessage()")
3.Write Javascript function like


Expand|Select|Wrap|Line Numbers
  1. function showMessage()
  2. {            
  3. if (document.getElementById('txtHiddenValue').value="True")
  4.     { 
  5.     alert("request is granted");
  6.     } 
  7. }
Mar 28 '07 #7

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

Similar topics

8
by: euang | last post by:
Hi, I have been using access 2000 for two years on WINDOWS NT to display dynamic aweb page using ASP My ISP has now changed to Windows 2003, and I am having major problems displaying...
2
by: Joe Price | last post by:
Hi chaps I've got an XML file, within that file i've embedded html code using the <!]> tag I'm displaying that xml file through a browser using an xsl style sheet. However it is displaying...
1
by: Yoshitha | last post by:
hi I have datalist control in my ASP.NET application the problem here is i have used a textbox with multiline true propertly when i enter data like "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd...
3
by: Dalan | last post by:
At first I was not certain what could cause Access 97 from displaying most jpeg images, but not all. After further testing, it seemed that all original images of less than 275 pixels per inch or...
5
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
3
by: Lyn | last post by:
I need some guidance for a technique that will allow me to accomplish the following... I have a table in which each record contains a photograph. I would like to display in a form a thumbnail...
5
by: Tomaz Koritnik | last post by:
Hi I have many short HTML files stored in a binary stream storage to display descriptions for various items in application. HTML would be display inside application using some .NET control or...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
15
by: Kevin Hanken | last post by:
Hi, Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2. I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code from the w3schools...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.