.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

Code for Message Box instead of "lblMsg"

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :ASP.Net

Hi anyone,

Please help me to put a message box instead of the lblMsg. I would like to put a massage box for this. Without display the message in the web page.

Following is the code which I have.


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            'Getting User details & privileges into a seesion

            objuserInfo = Session("SF_userDetails")

            userPrivileges = Session("userPrivileges")

            MessageBox.Visible = False

            lblMsg.Text = ""

            If Not Page.IsPostBack Then

                'if the query string values for process or mode exists then the control is coming from the add or edit page...


View Complete Post

More Related Resource Links

JQuery: is there a way to show status message - from code behind?


i am trying to figure out how to display message box after it done executing the server side code

 here is the code which works from the client side but still looking for a way to make it work from code-behind


<div id="status"></div>


$("#status").fadeTo(500, 1, function() { $(this).html("You are now registered!").fadeTo(7000, 0); })

.NET 3.5 SP1 failed with the error message - Error code 1603 for this component means Fatal error du

I had Beta version of VS 2008 and I wanted to install .NET 3.5 SP1. Installation led to some serious problems. I tried almost everything to install .NET 3.5SP1 (or VS 2008 SP1), nothing works

* VS 2008 has been uninstalled
* 3.5 uninstalled and cleaned
* 3.0 uninstalled and cleaned
* WF components removed
* document manager components removed

when I try to reinstall 3.5SP1, I keep receiving the following error in dd_dotnetfx35error

[01/11/09,00:23:05] XPSEPSC Installer: [2] Error code 1603 for this component means "Fatal error during installation.
[01/11/09,00:23:06] XPSEPSC Installer: [2] Setup Failed on component XPSEPSC Installer
[01/11/09,00:23:32] WapUI: [2] DepCheck indicates XPSEPSC Installer is not installed.

Then I check the contents of dd_dotnetfx35install for the event error log and found the following
[01/11/09,00:23:05] XPSEPSC Installer: ***ERRORLOG EVENT*** : Error code 1603 for this component means "Fatal error during installation.
[01/11/09,00:23:05] Setup.exe: AddGlobalCustomProperty
[01/11/09,00:23:06] XPSEPSC Installer: ***ERRORLOG EVENT*** : Setup Failed on component XPSEPSC Installer
[01/11/09,00:23:06] Setup.exe: GetGlobalCustomProperty - Property: {BBE1827C-F2FD-4FDA-A6D6-C83B62FFFDCA} - PropertyName: compfailed - Value: 0
[01/11/09,00:23:06] XPSEPSC Installer: CBa

Getting error message and other data back from SSIS to managed code




From a SharePoint workflow we are trying to synchronously execute an SSIS package - which seems to work - and display error messages and return some variables back to SharePoint.


I followed the "Running a Package Remotely by Calling a Remote Component or Service" instructions on http://msdn.microsoft.com/en-us/library/ms403355.aspx and executing and parameterizing the package does not seem to be a problem. But the SSIS package does a lot of plausibility checking and raises an error (RAISERROR in T-SQL or Error

OCIEnvCreate failed with return code -1 but error message text was not available.



We have a requirement to connect to oracle from ASP.NET and we installed ODAC(ODAC1110621) components  on the server but still we are getting the following error while opening the connection. Please find the details below:-

OCIEnvCreate failed with return code -1 but error message text was not available.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.

Source Error:

Line 16:     {
Line 17:         OracleConnection con = new OracleConnection(ConfigurationManager.ConnectionStrings["HRDBA"].ConnectionString);
Line 18:         con.Open();
Line 19:         Label1.Text = con.State.ToString();
Line 20:         con.Close();

Source File: \\hs003fs01-02.homebase.com\wfmp\Webpage1.aspx.cs    Line: 18

Stack Trace:

Nested SQLException; SQLState: 08S01 Vendor Code: 0 Message: Connection reset

I get this error on my web page whenever i keep open some applications. I browsed through some links which say that it could be a network issue. Though I havn't received any convincing answer though. Any idea why this happens?

Parser Error Message : Code blocks are not allowed in this file

I've used inline coding in my javascript functions to get the clientID of the controls in the runtime as

 <%= ctrl.ClientID %>

But i'm getting the parser error. Also i'm getting

"The event handler OnClick is not allowed in this page".

So i modified the web.config to add a page parser -

        <PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

But i'm still getting the same error. I've cross checked lot of times whether i'm modifying the correct web.config.

Any ideas?


how to get files in vb.net in all directories.I had written the code.if u see in the detaild message


This is in class file
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Collections.Generic
Public Class FileSrch
'' File Search Options
Public Enum FileSearchOptions
End Enum

Public Shared Function GetSearchcriteria(ByVal DatetoSearchwith As Date, ByVal Filename As String, ByVal FileExtension As String, ByVal SearchOptions As FileSearchOptions)

Select Case SearchOptions
Case FileSearchOptions.YearFirst
Return String.Format("{0}_{1:yyyyMMdd}{2}", Filename, DatetoSearchwith, FileExtension)
Exit Select
Case FileSearchOptions.MonthFirst
Return String.Format("{0}_{1:yyyyMMdd}{2}", Filename, DatetoSearchwith, FileExtension)
Exit Select
Case FileSearchOptions.NormalFiles
Return String.Format(Filename + FileExtension)
Case FileSearchOptions.DateinExtension
Dim ExtensionFormat As String = (Convert.ToInt32(DatetoSearchwith.ToString("mm")).ToString() & DatetoSearchwith.ToString("dd"))
'' Month in Double Digit
If DatetoSearchwith.Month > 9 Then
ExtensionFormat = (DatetoSearchwith.ToString("mmm")(0) & DatetoSearchwith.ToString("dd"))
End If
Return String.Format("{0}.{1}", Filename,

Accesing the sql message in c# code



 i have requirement, store procedure wresult will be displayed in message tab instead of result tab. because am using multiple print statement. how to access the printed message result in C# application




No error message available, result code: E_FAIL(0x80004005).




I am importing data from Excel to SQL. It works perfectly Locally.... but when its been uploaded to the server it gives this error.

Another thing, when I use less data(in excel) and import, then it works. But when I import LARGE amounts of data, it gives the above error.


Any assistance would be greatly appreciated :)



Hash-based Message Authentication Code in WCF 4.0 RESTful service


What is an ideal way of implementing "Hash-based Message Authentication Code" in WCF 4.0 REST, with out putting logic inside each service operation logic?  Can you give me an example of using ServiceAuthenticationManager or some kind of service behavior to accomplish this?


How do I write code to show message box when data is not available in database


Hello everyone,

I have successfully developed the C# code that will enable me search the SQL database for text box text and display the result in a datagrid view. When the text box text is not found in the database, an empty row is displayed in the datagrid view.

However, I am at cross roads on how to write and add C# code such that a message box will pop-up if and when the text box text is not found in a data base table.

Below is my code so far:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.SqlTypes;

namespace RidersCard1
  public partial class SearchDatabase : Form
    #region Global Declarations

    // Global declaration for SQL 

Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

Free Code Snippets - ASP.NET

You Can Find Useful ASP.NET Related Posts on the above link.

Free Code Snippets - C#

Free C# Code Snippets

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.
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