.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

how to keep error message label in center of page ?

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application

In winfomr I am usign a label to display different messages like success or falure and any other error message.

Please guide how to keep error message label in center of form. I want to make it centerilzed no matter text in it is one word or a sentense.

Kindly guide how to do that.

View Complete Post

More Related Resource Links

Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




Null reference message Custom Error page

how come a Null session value that is called, doesn't get directed to the Custom Error Page?

Response.Redirect cannot be called in a page callback error message.


Hi.  I'm using the Dundas Chart Controls in VS 2005.  These controls are built utilizing AJAX.  I have a basic page with a dundas chart control containing a funnel chart.  The funnel contains Quotes, Sales Orders and Invoices.  When the user clicks on the control, I want to determine whether they clicked on Quotes, Sales Orders or Invoices and transfer to the appropriate Details Page.  I've got the code working to determine which transaction type they clicked on; but, I get the "Response.Redirect cannot be called in a page callback." error when the page tries to redirect.  Note: I get a similar issue if I try server.transfer.


 Here's my code:

Dim hitTestResult As Dundas.Charting.WebControl.HitTestResult = Chart1.HitTest(e.X, e.Y)

            If Not (hitTestResult Is Nothing) Then

                Dim clicked As Dundas.Charting.WebControl.DataPoint = hitTestResult.Series.Points(hitTestResult.PointIndex)

                Select Case hitTestResult.PointIndex
                    Case 0


I can not create Article page in publishing site with a error message related to Microsoft SharePoin


I installed MOSS 2010 successfully with all requirements and options. After that It created a Publishing site. But, when I create an article page for news, the error page show that:


File Not found Trouble Shoot issues with Microsoft SharePoint Foundation (*).

Correlation ID: 5cce256-b30b-477d-9820-c46238f224a

Date and Time: ...


*:it's a link to open an error windows like this Besides, if i create a site with other templates (not Publishing template), I can not also start Publishing feature

Need help with a custom error page that shows the error message details


I know how to alter the web config to redirect to an errors page but what I need to do is have the actual offending error message print to that page. This is a special request for testing reasons, I realize the whole point of a custom error page is to provide a user friendly message when an error occurs but for testing we want to show the user the message so they can copy and paste it into a ticketing system we are using for beta testing feedback.

Should I use the global.asax instead? I am pretty new to vb.net and am not sure how to get the actual error message to display on my custom error page. Any guidance would be greatly appreciated.


Page IS Valid Validation Error and Message Box Pops up twice which is annoying???




i have a create User Wizard with a Custom Template so I can grab more information from the user who is

registering on my page.  When they click the submit button a window modal popup extender pops up using Javascript code to

show them the Form is being processed.


createUserWizard Submit Button

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  OnClientClick="ShowMP();" align="middle" CausesValidation="False"
                                            Text="Submit my Profile"  />


Javascript code<

WebBrowser control error message page handling




I have WebBrowser control on my winform. When I try navigate to some web-site I get standard IE error pages like:

  • "Navigation to the webpage was canceled"
  • "The address is not valid"
  • "Page couldn't be loaded"
  • etc.

I need to handle these errors and return custom error message to user. Is there any way to solve this issue?

I know about NavigateError event from the OLE DWebBrowserEvents2 interface. I implemented it. But when some navigation error occures I need stay at page from which user tried navigate (CanGoBack property returns false if it's first page).

Is it real? How?



Handling 404 page not found with Error page



      How do i handle 404 page not found?

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

center alignment of web page


Hiiii Coders,

I have build a website . Now what i want is that it should be centralized according to resolution i.e.. on increasing resolution its margin from both sides should be equal.

Remember I have completely done with my website.

How can i get it done

plz provide some code snippet

thanx and regards 

urlrouting - page not found error


I have a dynamic data site setup and running locally fine from vs 2008.

When i deploy to a remote windows 2003 server (IIS6), all the pages also work ok apart from one page/table.  I can access it's list page,  but the edit and insert pages throw 404 errors.

I'm thinking it's a url routing/hosting issue as i've copied back the database from the remote server and it all works fine on my local machine.

Is there anything i can do to debug this behaviour?

Below is my register routes entry from the global.asax

Any suggestions greatly appreciated as, i've been stuck on this for days :(

public static void RegisterRoutes(RouteCollection routes)
    MetaModel model = new MetaModel();
    model.FieldTemplateFactory = new AdvancedFieldTemplateFactory();

    model.RegisterContext(typeof(Sponsorship.Data.Entities), new ContextConfiguration() { ScaffoldAllTables = false });
    model.DynamicDataFolderVirtualPath = "~/admin/DynamicData";

    routes.Add(new DynamicDataRoute("admin/{table}/{action}.aspx")
        Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

Weird security configuration error message


Recently something has gone wrong with our website so that whenever you try to access an aspx file, it shows the following error:


Server Error in '/RALSWeb' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Access is denied: 'RalsWeb'.

Source Error:

Line 256:                <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 257:                <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 258:                <add assembly="*"/>
Line 259:            </assemblies>

Parser Error Message: Could not load type MasterPage File



Server Error in '/' Application.

Parser Error

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

Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.

Source Error:

Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Wam.master.cs" Inherits="wamsilverlight.Web.Wam" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Wam.Master    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927


All of the following have been tried over and over again:

1.) Delete all existing .dlls

2.) Delete MasterPage File and recreate it.

3.) Delete MasterPage perform a c

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