.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

Page goes to error after click before page fully loaded.

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

Hi all ,

 When user cliick on the control before page fully loaded it goes to error page. 

Following is the trace.

Execution Error

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

  at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)

  at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument)

  at System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection)

  at System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)

  at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)


View Complete Post

More Related Resource Links

Dynamically Loaded UserControl, receiving the click event from UserControl to Parent Page



   In a page , when I click a button 'showDialog' I am loading the user control dynamically in a dialog.  I am linking to the event in the user control as explained below. The parent page is not receiving this event.

  ex: (This is in the page class)


         UseControl1 gc = dlg.LoadContent(:\UserControl1.csx);

        gc.CausePostback += new EventHandler(execute_CausePostback());



   // I am trying to update the details grid in parent page


In UserControl class after clicking the submit button


  raise event CausePostBack();


Any help is appreciated.



Rich Text editor comes up with random error The Page took too long to save. You can click "Cancel",

I seem to get a random error when i open the rich text editor in a content editor web part and try to save the changes.

The error i get is:
Are you sure you want to navigate away from this page?
The page took too long to save. You can click "Cancel", and then try to save the page again. If you click "OK", you might lose unsaved data.
Press OK to continue, or Cancel to stay on the current page.

If i click OK it seems to save the changes but this problem is very annoying and users are obviously worried when they see this error.
Does anyone have any ideas what is causeing this error across the entire site? and are there any fixes?

thanks for your time,

Tony Phillips

Master Page Error - cannot be loaded

We're using WSS 3.0
I'm not sure what's gone wrong but it all happened after authentication was set to Kerberos and then back to NTLM.
That was all sorted but now we have another problem.

The live site works fine when browsing, but when opening a page in Sharepoint Designer it says Master Page Error - The master page file '~masterurl/default.master' cannot be loaded.
If i try and attach the master page I get an error stating 'Make sure Frontpage Extensions or Sharepoint Services are installed on the server.' and there is nothing in the Details.

Sharepoint Services are installed, we have two other sites (web applications) that are working fine.

When I click on the Web Parts Taskpane in Designer it says it can only be run on servers running Windows Sharepoint Services.
Also when opening the site in Designer it asks me if I want to edit the Live Web Site or a local copy, its never done that and doesn't for the other sites.

Any idea where I've gone wrong?

'Master Page cannot be loaded' Error

Hi, I suddenly started developing some near-fatal errors with my Sharepoint site. I found that it was somehow difficult to edit the home page for the site collection, so I decided to create another 'default.aspx' and replace it as the hompage. Problem is,  the new home page was still using the original master page and looked funny, so I copied and replaced the old master page, keeping it as a copy just case. When the new home page still looked funny, I deided to change everything back, but then the following error occured:

'The Master Page cannot be loaded. "File Name"
Please attach a different Master Page or go to Code View to resolve the error'.

The link to attach a different master page doesn't do anything, and the 'go to Code View' link doesn't show the error. Strangely the file name of the master page it can't load is not the default master page, and more annoyingly, the file exists!!! I don't know what to do. In Internet Explorer, the home page only shows this erroe: 'File Not Found'.

Help me, what did I do wrong?

stop postback after imagebutton click on page validation error



i have some textbox that i validate with a customvalidator control (only, and must be, server side function) and i have an imagebutton control for submit.

I must stop the postback if there are some errors in the validation function.

I set the validation property argumets.isvalid = false in the customvalidator function but doesn't work, the postback continue.

i have tried to set the imagebutton property postbackurl = "" in the validation function but doesn't work.

Where is the error?

Handling 404 page not found with Error page



      How do i handle 404 page not found?

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" }),

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!




Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page


how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services


Thanks in advance

Button click in master page use in other pages I have to click twice. Why?


In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?

How to process data AFTER page is completely loaded for the user?


I have some logging that has to be done, which are some database update or inserts.

However this logging is of no importance to the user, so I only want to process the data/logs after the page is completed for the user.
As of now, if I process the data while the page is loading, I go from 1.4 to 2.0 speed (server side time processing of code), which is quite a bit comparing it is of no use to the user.

So I want this code only executed after that the page is complete.

I've been checking out Ajax, async pages etc, but the problem is it still gets executed before the page is rendered to the client, which means the client will have to wait longer then it is not being processed.

I've been checking out Threadpool.queueBackgroundWorker, however if I get it correct, this will still be executed before the page is shown to the user, as it has to complete before the prerender.

Then I thought about creating a new thread, and do the processing there, which would not have my page waiting to complete the data/logging.
However when I have 100 or 200 users loading pages at the same time, then that would mean I would be creating 200 threads on those loads, which I doubt will be good for performance. So if I want to solve this, I would have to create my own threadpool and only assign for example a max of 40 threads to it which can pr

Convert .docx to web page - "the converter cannot complete the task because an internal error occurr


I'm trying to convert docx files to webpages to be published in to a library elsewhere on our sharepoint site. At first I was having no problem, the files were converting, however more recent files have returned the error: the converter cannot complete the task because an internal error occurred

I've tried writing, uploading and converting a simple docx file, and this works which has led me to believe that the problem is something in the docx files that i'm trying to convert. So i tried using word07 to clean the documents up by clicking Office button>prepare>inspect document then removing all the metadata, custom xml etc from the files resave, upload and convert, but still no joy.

I'd simply rewrite the document but the problem is that there are a lot of them.

Any ideas what's going wrong?


SharePoint 2007 Central Admin - blank page, isapimodule error in IIS


I've got a Windows 2008 SP2 server runing x64.

When i try to access the SharePoint Central Admin site, I just get a blank page. No errors in the Windows logs, nothing showing up in the SharePoint logs. The IIS log shows a 500 error.

I enabled Failed Request Tracing for the 500 status code, which gives me the following information:

ModuleName IsapiModule

Notification 128

HttpStatus 500

HttpReason Internal Server Error

HttpSubStatus 0

ErrorCode 2147942593


Catch button click event in different .aspx page.


I have a button which starts processing.
I want that when ever a button is click from page1.aspx .. a count down timer should start and displayed on page2.aspx.
I am thinking of using iframe to join 2 pages.

Please let me know your suggestions.


Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

Master-Detail GridView in Single Page example with paging throws error

___http://www.java2s.com/Code/ASP/Data-Binding/MasterDetailGridViewinSinglePage.htmI followed example at the link above.When I enablind paging=true (by pagesize=3).and clicking to pages 2|3|4 etc and so;error occuringIndex was out of range. Must be non-negative and less than the size of the collection.at cs line :sourceProducts.SelectParameters[0].DefaultValue = gridMaster.DataKeys[e.Row.DataItemIndex].Value.ToString();got any idea?what should I make to fix this ? is this error  fixable ?thanks much.

error when logout my web page

sir i am usinng ajax roundcorners toolkit but when i logout my web page error occuers . error is:- Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.RoundedCornersBehavior' cannot be converted to type 'AjaxControlToolkit.RoundedCornersBehavior'. Parameter name: instance
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