C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Urgent


Posted Date: 19 Aug 2008      Posted By: Johan      Member Level: Gold     Points: 1   Responses: 4




hi , ihav 2master pages..
profile.aspx included in masterpage1...and products.aspx with masterpage2..
both master pages have scriptmanager for ajax..
but when i browse, profile.aspx to product.aspx..i got this error..

System.InvalidOperationException: Only one instance of a ScriptManager can be added to the page.

Any one know the soln for this..
with regards





Responses

Author: VijayaShankar    19 Aug 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 1

use ScriptManagerProxy control in profile.aspx to retrieve the script manager control


Author: Vidhya    19 Aug 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

hi,

verify the following one:

Enables nested components to add script and service references to pages that already contain a ScriptManager control in a parent element.

http://atlas.asp.net/docs/Server/Microsoft.Web.UI/ScriptManagerProxy/default.aspx

sample code:
for that try this one

1) register your Microsoft.Web.Atlas dll in GAC

2) on master file top register dll

<%@ Register Namespace="Microsoft.Web.UI" Assembly="Microsoft.Web.Atlas" TagPrefix="atlas" %>

<%@ Register Namespace="Microsoft.Web.UI.Controls" Assembly="Microsoft.Web.Atlas"


TagPrefix="atlas" %>

<atlas:ScriptManager runat="server" ID="scriptManager1" EnablePartialRendering="true"></atlas:ScriptManager>
<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<

html xmlns="http://www.w3.org/1999/xhtml">


3) on your web page or controls register ...

<%

@ Register Namespace="Microsoft.Web.UI" Assembly="Microsoft.Web.Atlas" TagPrefix="atlas" %>
<%

@ Register Namespace="Microsoft.Web.UI.Controls" Assembly="Microsoft.Web.Atlas"

TagPrefix="atlas" %>

<atlas:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server" >
</

atlas:ScriptManagerProxy>


4) on drop down listbox controls ....

<

asp:DropDownList ID="ddlCountry" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"

Width="100px">

</asp:DropDownList>
<

atlas:UpdatePanel ID="updPanelCountry" runat="server">

<Triggers>

<atlas:ControlEventTrigger ControlID="ddlCountry" EventName="SelectedIndexChanged" />

</Triggers>

<ContentTemplate>

<asp:DropDownList ID="ddlProvince" runat="server" Width="100px">

</asp:DropDownList>

</ContentTemplate>

</atlas:UpdatePanel>

check this code to ur code.

really it helps you!
Happy programming!



Author: Saurabh Hoonka    19 Aug 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 6

An InvalidOperationException exception is thrown when the failure to invoke a method is caused by a reason other than an invalid argument. This might be thrown by .NET Framework methods when the underlying Win32 method cannot be invoked.

If you are using the Graphics object after the GetHdc method, call the ReleaseHdc method.
This will release the context handle obtained by a previous call to the GetHdc method of the Graphics object.

TableAdapters require valid UPDATE, INSERT, and DELETE commands to perform a successful save operation.
TableAdapters generate INSERT, UPDATE, and DELETE statements based on the original SELECT statement entered into the wizard. In some situations, the SELECT statement does not provide enough information for the adapter to generate the commands that are required to create the INSERT, UPDATE, and DELETE commands required for a successful save. This often occurs when the database table does not have a primary key column, or the SELECT command uses JOINS
Pass a valid endpoint name to the service client constructor.
When a Windows Communication Foundation (WCF) client has only one endpoint, there is no ambiguity and you do not have to list the endpoint as an argument. However, when two or more endpoints exist for the same contract type, you must specify which one the client uses. For example, defining a client as an instance of ServiceReference.ServiceSoapClient(), without an argument, raises this exception. You can resolve the problem by specifying a particular endpoint:

Dim client As New ServiceReference.ServiceSoapClient("ServiceSoap")

Similarly, this exception is raised if you provide an endpoint name that cannot be found. In this case, you must identify and provide a valid endpoint name.

When you run your code in the Visual Studio debugger, an InvalidOperationException is thrown if you access a UI element from any thread other than the one on which it was created. The debugger does this to warn you about a dangerous programming practice. UI elements are not thread-safe and should be accessed only on the thread that created them.

If the method invocation failure is caused by an invalid argument or arguments, ArgumentException or one of its derived classes, ArgumentNullException or ArgumentOutOfRangeException, should be thrown instead.
For 64 bit development with Visual Studio and SQL Server Compact 3.5, the Target CPU option in the Advanced Compiler Settings must be explicitly set to x86. When the Target CPU is set to the default value of Any CPU, you might receive an "Unable to load sqlceme35.dll" message. Set the Target CPU option in the Advanced Compiler Settings in project properties.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Google Web API
Previous : How do I load pages in content place hoder
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use