.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Message Display Problem

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net


I am facing a  strange problem .i use following code for show successfully message to user.so it is working fine but problem is when I go another page and came back same page again  through  browser back button again successful message display.

For example suppose there are two page i.e one.aspx nad two.aspx.  i  save one.aspx record then message display me that "Record Insert Sucessfully!!" then I go to two.aspx and when I came back again one.aspx by browser back button again same message are display again

please someone help me.

Script for message

ClientScript.RegisterStartupScript(Me.GetType(), "alert", "<script language='javascript'>alert('Record Updated Sucessfully..')</script>")

Use like

Public Sub SAVEDATA()



            MYTRANS = myConnection.BeginTransaction()






View Complete Post

More Related Resource Links

Session problem with display of image in row of reportviewer


Hello techies...

I am new to this sql reporting service. But anyhow by surfing I am able to bind the report but i was stuck in image display.

Anyways, i also managed that. But the real problem is whenever i was keeping a image control in rdlc report i was having session prob. If i remove the image control then as usual report works fine.

Please suggest me some solution.... either for session problem or for image display. I am keeping the image name in database but for binding the rdlc report i am using a store procedure which return the path (static) concating with the image name(kept in database).

Hope to find a solution .....

How can I solve this problem?::Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.Cryst


I upgraded my web application from visual studio 2003 to 2008. When I want to create a report in visual studio 2008 and receiving this error at runtime. I am able to compile but when runnning thats when I am getting this error.

How can I solve this problem? please help.

Compilation Error

Server Error in '/IRPSDEV' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\irpsdev\9e97e0a9\94a2ecd\assembly\dl3\151eb571\00df56e1_6064c201\CrystalDecisions.Web.DLL'

Source Error:

Line 161:        
Line 162:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 163:        private global::CrystalDecisions.Web.CrystalR

[VS2008] Designer's display problem

Hello, I created a solution with multi-project and i've recently added some resources files to lacalized my application and of course my XAML files too. I used the "How To:" http://msdn.microsoft.com/en-gb/library/dd882554(v=VS.95).asp I inserted the class LocalizedString in one off my project that I use as library for common actions. But since, my designer is not loading properly because it can't find this class while I precised the good assembly and that the application is running properly with resources applied. It's then not handy to develop an HMI... If anybody has an idea about this trouble... Of course I tried dozens of times to clear the projects and regenerate without success. Thank you for your help !

How to get SPPageStatusSetter to actually display a status message

I have a event listener running on a list, with several possible conditions.  I want to use the status bar to update the user as a case happens.  I thought, that since the code is a event reciever/listener, that this would be considered server side code, and to make something appear on the status bar, I can use the SPPageStatusSetter.AddStatus method to show the message.  Yet, when I put in the method parameters, nothign  happens. (I did a statusbar= new SPpageStatusSetter(), statusbar.AddStatus("caller", "messgae", Yellow)) What am I missing?  Is this not considered server-side code, and I should use the other mechanism to set the status bar?  or? thanks rsRocky Sanders

Problem with GridView display

I have a calendar control where a user selects a date and then inputs info into a FormView control. Underneath the FormView is a GridView that shows all data from the SelectedDate on the calendar control. However, when the date is selected, all the information from the table ( from all dates ) is displayed. Any ideas on why? Code is below and thanks:<asp:Calendar ID="calendarInstallDate" runat="server" BackColor="White" BorderColor="Black" DayNameFormat="Shortest" Font-Names="Times New Roman" Font-Size="10pt" ForeColor="Black" Height="220px" NextPrevFormat="FullMonth" TitleFormat="Month" Width="400px" onselectionchanged="calendarInstallDate_SelectionChanged" > <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" ForeColor="#333333" Height="10pt" /> <DayStyle Width="14%" /> <NextPrevStyle Font-Size="8pt" ForeColor="White" /> <OtherMonthDayStyle ForeColor="#999999" /> <SelectedDayStyle BackColor="#CC3333" ForeColor="White" /> <SelectorStyle BackColor="#CCCCCC" Font-Bold="T


Error in query: select * from geodesic_group_attached_price_plans where group_id = and price_plan_id > 0. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and price_plan_id > 0' at line 1

Display Message

I want to display message such that when user fill register form, and after compliting all fields a message i.e Record Inserted Successfully. plz help me out....

How to display a prompt message from gridview_deleting event

Hello, i am following a code example to prompt user before delete and have a reference to the commandfield Delete linkbutton.But something is missing because nothing happen when executed.  Gridview1_Deleting linkBtn.OnClientClick = "return confirm('Are you sure you want to delete this entry?');" end sub <Columns>                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />

How to display pop up message in SSRS 2005?

Hi Guys, I have two parameters : 1. ReportType (with values - Manager, Supervisor, ALL) 2. EnterID (should enter manually) Normally, the intention of my report is when the user selects ReportType as ALL, they should enter in EnterID as ALL But for some reason, when the user selects ReportType as ALL and he enters the EnterID as value 100 or 200 or some number, the report is showing incorrect results. Now, what I want is When the user selects ReportType as 'ALL'  and if he enters anynumber other than ALL, I would like to see a pop up message displaying saying 'Please type ALL'. Is this Possible?

problem with dimenssion Display Values



I Have built a cube and deploy it to 2008 Olap Server.  the dimenssion data looks great .

while deploying the same cube / project to another server (2005 server) the dimenssion data

displayed ?????????????? instand of the correct value. the correct value is in hebrew language.

i check the collation in 2005 server and it support Hebrew Language.

what can be the reason to that?


Win7, IE8 display formatting problem


We only have one Win7 box in the company and it does not want to display our sharepoint 2003 pages correctly. It’s not consistent either, some times it will load correct and other times it won’t. When it’s working right, the pages load quickly, when its not, the pages load real slow or not at all. When they don’t load correct, it’s like the CSS or something along them lines is messed up. The colors are not correct, the text is larger and not where it should be.


The Win7 box has all the latest updates. I’m not sure what patch level the server and sharepoint are at, I don’t manage them myself.

Problem in display Full Name after logged in (Session Problem)


After login, i have create a session to display the Username of the logged user, however instead of display the Username, i want to display the Full_Name of the logged user

However i have no idea how it dones....Kindly if you could help me in giving suggestion / ideas. Thank you.

PersonUser Table

P_ID (PK)   =1

Username =lucy88

Password =88ycul

Full_Name = Lucy

User_Type =Admin

Login.aspx - as i do session, it will display lucy88 however i would like to display Full_Name which is Lucy.


    protected void Button1_Click(object sender, EventArgs e)
        SqlDataSource sds = new SqlDataSource();
        sds.ConnectionString = ConfigurationManager.ConnectionStrings["MyDB"].ToString();
        sds.SelectParameters.Add("Username", TypeCode.String, this.TextBox1.Text);
        sds.SelectParameters.Add("Password", TypeCode.String, this.TextBox2.Text);

        sds.SelectCommand = " SELECT * FROM [PersonUser] WHERE [Username] = @Username AND [Password] = @Password";
        DataView dv = (DataView)sds.Select(DataSourceSelectArguments.Empty);

        if (dv.Count

Display confirm message using javascript after user successful logs in



I need to display a javascript confirm box after the user successfully logs into the application. If the select 'yes'  of the confirm box then I need to navigate them to a different page and if they select 'no' the default.aspx page should be displayed. I am using the login control.

I tried to use ClientScript. RegisterClientScriptBlock on Login1_Authenticate event, it didn't work. I tried the same thing on the Page_Load event of Default.aspx as well as Master Page load event, that also didnt work.

How can this be accomplished? Need a quick resolution.



Display "Successfully Inserted" Message on the same form/page


I have a page setup that i would like to add a message when the record was successfully inserted. My button event code is as follows:

dac.insertAccessPointintosql(ddlAP, txtIP, ddlAPType, ddlAPFreq, ddlAPBand, txtLoc, txtUser, txtPass);

This works great and inserts, but would like to provide confirmation without having to send to another page.


Problem with Configuration of Message Inspector

I'm hoping someone might know what I am doing wrong. I'm trying to setup message interceptors and am trying to apply them to all of my services via the web.config. I've been working on it for hours but keep getting the following error:

Parser Error Message: The type 'AdventureWorksService.
Interceptor.ListenerServiceBehavior, AdventureWorksService.Interceptor, Version=,
        Culture=neutral, PublicKeyToken=null' registered for extension 'TestInterceptor' could not be loaded.

I have the classes under a the 'AdventureWorksService.Interceptor namespace in my web project.

Here my web config:

<?xml version="1.0"?>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true">
        <add relativeAddress="~/DataService.svc" service="AdventureWorksDataService"/>
    <!--For REST-->

How do i display a custom message when my ListBox is empty?


I've got a ListBox. Its ItemsSource is Data-Bound to a Dataset.

When there are entries in the Dataset, the ListBox displays them, and it doesn't look so bad.

The ListBox is big, so when its empty it looks weird on the Window.

What i want to do is to display a custom mesasge somewhere inside the listbox(maybe in the center) if there is nothing to display. But i've had no luck sofar.

How could i go about achieving this?

Format Message Box Problem!



How can I format a display message box. Actually I using following script for display successfully message.

msg = "Record Inserted Sucessfully!"

ClientScript.RegisterStartupScript(GetType(Page), "alert", "<script>alert('" & msg & "');</script>")

But I need some change here.i need to display a Challan number to user through message box like

msg = "Record Saved!" + "Your Challan No. is" + txtChallanNo.Text.ToString()


            ClientScript.RegisterStartupScript(GetType(Page), "alert", "<script language=JavaScript>alert('" & msg & "');</script>")


I need message box should display like following


Record Saved!Challan No. is:-100.


Is it possible?if not please suggest me suitable way.

Thanking you


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend