CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/28/2006 2:01:48 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 38 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
Swati Jain
Asp.Net User
javascript Popup calender with MasterPage12/28/2006 2:01:48 PM

0/0

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.

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.ArgumentException: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 
[ArgumentException: 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.]
   System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +261
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +83
   System.Web.UI.Control.ValidateEvent(String uniqueID) +34
   System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +39
   System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +36
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +479
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2545

 


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddNewOfficer.aspx.cs" Inherits="AddNewOfficer" MaintainScrollPositionOnPostback ="true" Debug ="true" MasterPageFile="~/MasterPage.master" %>

 

   

    <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 <script  type="text/javascript"   src="JScript.js">

 

 

</script>

    <form >

    <div>

>

>

            <tr>

                <td style="width: 125px; height: 30px;">

                 <asp:Label ID="Label6" runat="server"  Text="Joining Date" Width="90px"></asp:Label>

                </td>

                <td style="width: 250px">

                <asp:TextBox ID="TextJoindate" runat="server" Width="150px"></asp:TextBox>

               <a href="javascript:GetDate('Ctl00_ContentPlaceholderID2_TextJoindate');">

        <img alt="PopUp Calendar" src="../Images/SmallCalendar.gif" style="width: 39px; height: 24px" /></a>

                </td>

    </form>

 

</asp:Content>

 

<%--</body>

</html>

--%>

 

 

 on Page_load of content page  I have written as followsw

string strJSFile;

 

        strJSFile = this.ResolveClientUrl("JScript.js");

 

        Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "mykey", strJSFile);

 

Though Javascript code is working fine But 

After clicking on the Addbutton first i got the runtime error theForm._SCROLLPOSITIONX is null or not an object or aboove server error is thrown .

Plz tell me the exact way with the example of some source code

SWati Jain

pushp_aspnet
Asp.Net User
Re: javascript Popup calender with MasterPage12/29/2006 5:44:18 AM

0/0

Hi,

why do you need to dynamically include the js file when you are already including it statically(in the head of your master page)?

Anyway, here's how to do it:  http://msdn2.microsoft.com/en-us/library/kx145dw2.aspx

A suggesstion: Using hardcoded id's for your controls is not a very good practice:

You can replace this: <a href="javascript:GetDate('Ctl00_ContentPlaceholderID2_TextJoindate');">

by this: <a href="javascript:GetDate('<%=TextJoindate.ClientID%>');">

Hope this helps.
 


Home Is Where the Wind Blows
http://pushpontech.blogspot.com
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
javascript Popup calender with MasterPage - ASP.NET Forums javascript Popup calender with MasterPage. Rate It (1). Last post 12-29-2006 12: 44 AM by pushp_aspnet. 1 replies. Sort Posts: ...
ASP.NET - Popup Calendar With Master Page | DreamInCode.net Oct 22, 2008 ... Popup Calendar with master page, Calendar not closing after pop with ...




Search This Site:










can't pass parameter to stored proc from treeview control

updatepanel and masterpage

physically adding sitemap node

regarding menu control styles

css control adapters

javascript and treeview_togglenode

how to manually clear sitemap?

treeview expand/collapse problem

menu style problem

masterpage design for the future faster development

server.htmlencode not working in masterpage environment

how to set meta tags while using master page?

problem: masterpage + external css file

is masterpage only apply to pages? not usercontrols?

designer support for nested masters

what i see is not what i get!!! (cell's borders and css styles)

how can i embed *.swf file in a matster page menu

masterpage - contentplaceholder

image not displaying correctly with css

someone with ie6 please help!

i have a secured folder with some pages in it but the master page that created them is not. results, my pages in the folder are not displaying right

master file does not exist

web page

visual web developer express - image display problem

menu itemclick and navigateurl

asp.net2.0 menu controls for content pages

content page blocking dynamic menu on master page

how to override <menu> default output & have a css stylesheet control all rendering

dynamically inserting nodes into sitemap

treeview ontreenodepopulate tree populate error

  Privacy | Contact Us
All Times Are GMT