Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Wednesday, March 28, 2012

Control ID Changed and GetElemntByID Return NUll

I have this code

<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<asp:TextBox ID="TxURL" runat="server"></asp:TextBox>
<asp:Button ID="Test" runat="server" Text="Button" OnClick="Test_Onclick" />
</ContentTemplate>
</asp:UpdatePanel>

I try to run this script

var TextControl= document.getElementByID("TxURL")

or

var TextControl = $get("TxURL")

but return value is NULL.

so How, to get Item in Client with the orignal Name. not the generated Name

Thanks.

U may be using Master Pages or UserControl thats why the client id of the control are not the same which u give to the control on the design time

try to run this script

var TextControl= document.getElementByID("<%= TxURL.ClientID %>")

or

var TextControl = $get("<%= TxURL.ClientID %>")

Contacts sample Atlas application error

When I try to run the site locally, I get aConfiguration Error .

Server Error in '/Contacts' Application.

Parser Error Message:Could not load type 'Microsoft.Web.Services.WebResourceCompressionModule'. (c:\inetpub\wwwroot\contacts\web.config line 62)

Line 62 is:<add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>

Also, I see this error in Visual Studio: Error 1 Type 'Microsoft.Web.UI.Controls.AutoCompleteProperties' does not have a public property named 'MinimumPrefixLength'. c:\inetpub\wwwroot\Contacts\DefaultFull.aspx 93

What do I need to modify here? Aren't these samples supposed to run without any tweaking?

Ooops...

Never mind. I just had to install the new March CTP of Atlas. I guess my installed version was a bit older.


Hi pmarangoni

The contacts\readme.txt has the following step to install and run the sample

ASP.NET 'Atlas' Contacts Sample


Setup
=====
Copy the following file:

C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Microsoft.Web.Atlas.dll

to the Bin folder in the folder where you have the Contacts sample files.


Running the Sample
==================
1. Open Visual Studio

2. Open the Contacts project by following these steps:

a. In the "File" menu, click "Open Website."
b. In the "Open Web Site" dialog box, click the "File System" tab.
c. Navigate to the folder where you have the Contacts sample files, and
then click "Open".

3. Run the Default.aspx page.

4. Navigate in the GridView control.

Notice that paging or sorting does not require a postback.

5. Drag the "Add new contact" panel to a different location on the page.

6. Enter a new contact.

Note that the box provides auto-complete behavior.


Hi jhawk,

I've tried following the instructions on most of the samples, including the Contacts sample.I haven't gotten any Atlas sample to work. Some of them won't even compile because of javascript errors. Others have runtime javascript errors.

As far as Contacts go, "Default.aspx" doesn't use any Atlas. You have to run "DefaultFull.aspx". However, when I try to run the "DefaultFull.aspx" page, I get a runtime javascript error: "invalid argument".

I think the samples need some more careful review.

Monday, March 26, 2012

Conflict between Microsoft ASP.NET 2.0 AJAX Extensions (Atlas) and ArcGIS Server 9.2 Contr

Helloo,

I was trying to use Microsoft ASP.NET 2.0 AJAX Extensions (Atlas) and ArcGIS Server 9.2 controls in the same web applications but there were conflict a between the Map control and UpdatePanel control as the error message appear with the message (“unknown error”);

Why this conflict occurs?

Is there’re any solution that enable be to use the UpdatePanel control in the same page with Map Control?

In the Atlas CTPs we had a lot of conflicts with 3rd part controls (and even some of our own controls) because we did a lot of automatic scanning for scripts and things like that. In Atlas 1.0 we don't do automatic stuff like that because it breaks too easily. Instead, 3rd party controls will have to be updated to be compatibleinside the UpdatePanel. If they're outside the UpdatePanel then they typically don't require any changes.

Thanks,

Eilon

ConfirmButtonExtender and ModalPopupExtende "ScriptLoader is already loading scripts." Pro

I created the following GridView

<asp:UpdatePanel ID="ProductsListUpdatePanel" runat="server">
<ContentTemplate>
<asp:ObjectDataSource ID="ProductsObjectDataSource" runat="server" SelectMethod="GetAllProducts"
TypeName="ProductsDataSource"></asp:ObjectDataSource>
<asp:Panel ID="pnl_Confirm" runat="server" Style="display: none" CssClass="ModalPopup">
Are you sure?<br />
<br />
<asp:Button ID="btnOk" runat="server" Text="UsuĊ„" />
<asp:Button ID="btnCancel" runat="server" Text="Anuluj" />
</asp:Panel>
<asp:GridView ID="ProductsGridView" runat="server" DataSourceID="ProductsObjectDataSource"
DataKeyNames="Id" AutoGenerateColumns="False" CssClass="Grid" OnRowDataBound="ProductsGridView_RowDataBound1"
OnRowCommand="ProductsGridView_RowCommand">
<Columns>
<asp:BoundField DataField="ProductPFK" HeaderText="ProductPFK" Visible="False" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="EditImageButton" runat="server" CausesValidation="False" CommandName="Edit"
ImageUrl="~/CSS/Pictures/edit.GIF" Text="Edit" />
<asp:ImageButton ID="DeleteImageButton" runat="server" CausesValidation="False" CommandName="Delete"
ImageUrl="~/CSS/Pictures/delete.GIF" Text="Delete" />
<ajaxtoolkit:ConfirmButtonExtender ID="ext_confirm_Delete" runat="server" TargetControlID="DeleteImageButton"
DisplayModalPopupID="ext_Modal_Delete">
</ajaxtoolkit:ConfirmButtonExtender>
<ajaxtoolkit:ModalPopupExtender ID="ext_Modal_Delete" runat="server" TargetControlID="DeleteImageButton"
PopupControlID="pnl_Confirm" CancelControlID="btnCancel" BackgroundCssClass="ModalBackground"
OkControlID="btnOk">
</ajaxtoolkit:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:ImageButton ID="RollButton" runat="server" CausesValidation="False" CommandName="RollDown"
ImageUrl="~/CSS/Pictures/plus.GIF" Text="Button" CommandArgument='<%# Eval("Id") %>'
Visible="false" />
<asp:Label ID="ItemName" runat="server"><%# Eval("Name") %></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Operator" HeaderText="Agragacja" />
<asp:CheckBoxField DataField="OwnNeeds" HeaderText="W?asne potrzeby" />
</Columns>
<HeaderStyle CssClass="GridHeader" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

When I click the RollButton new rows apears in the GridView. When the page is rendering, ConfirmButtonExtender and ModalPopupExtenderare loading I can still click some other buttons like DeleteImageButton button. Then I get the error:

Microsoft JScript runtime error: Sys.InvalidOperationException:
ScriptLoader.loadScripts cannot be called while the ScriptLoader is already
loading scripts.

What is the comprehensive sollution of this problem?

I tried to use the UpdateProgress control but I couldn't create such <div> and CSS that would cover the whole page (in IE6).

It also takes some time to render the whole ModalPanel for many rows. I belive that there is any method to do it faster.

Any solution is really welcome.

Hi W.kiermasz,

It is not an effiecient way to add AJAX Controls to each ItemTemplate. If you insist on your method, I suggest that you should use a div convered all the screen when page is loading. Meanwhile, add another javascript which will detect whether the last AJAX control is prepared or not by using typeof($find("AJAX Control's BehavavoirID")). If the last one prepared, hide the top div and show the GridView. Here is the sample which shows how to use only one ModalPopupExtender in a GridView.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { //Attach a Javascript funtion to the LinkButton. LinkButton myLinkButton; for (int i = 0; i < GridView1.Rows.Count; i++) { myLinkButton = (LinkButton)GridView1.Rows[i].Cells[4].FindControl("LinkButton1"); myLinkButton.Attributes.Add("onclick", "shopModalPopup('" + GridView1.Rows[i].Cells[0].Text + "');return false;"); } } protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { string text = e.Command.CommandText.ToString(); }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style> .modalBackground { background-color:Gray; filter:alpha(opacity=70); opacity:0.7; } .modalPopup { background-color:#FFD9D5; border-width:3px; border-style:solid; border-color:Gray; padding:3px; width:250px; } </style></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" ItemStyle-Width="0" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server">Click On Me</asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString%>" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName], [Title] FROM [Employees]" onselecting="SqlDataSource1_Selecting"> </asp:SqlDataSource> <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Height="200px" Width="300px" style="display:none"> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> EmployeeID:<asp:TextBox ID="tbEmployeeID" runat="server"></asp:TextBox> <br/> Reason:<asp:TextBox ID="tbReason" runat="server"></asp:TextBox> </ContentTemplate> </asp:UpdatePanel> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> </asp:Panel> <div style="display: none"> <asp:Button ID="Button1" runat="server" Text="Button" /></div> <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" PopupControlID="Panel1" CancelControlID="btnCancel" BackgroundCssClass="modalBackground"> </ajaxToolkit:ModalPopupExtender> <script type="text/javascript" language="javascript">function shopModalPopup(employeeID){ //show the ModalPopupExtender $get("<%=tbEmployeeID.ClientID%>").value = employeeID; $get("<%=tbReason.ClientID%>").value =""; $find("<%=ModalPopupExtender1.ClientID%>").show(); } </script> </form></body></html>
I hope this help.
Best regards,
Jonathan

Saturday, March 24, 2012

Configuring a Web Server for AJAX

I am new to programming and trying to use AJAX. It works fine on my local machine, however, when I move it to my server, I get all kinds of errors. I am sure what to do to configure my web server.

Hi,

Can you paste the error message so that we can get some hints on the exact issue? Also, check out this post for details on latest AJAX release:

http://weblogs.asp.net/scottgu/archive/2007/01/23/asp-net-ajax-1-0-released.aspx

More information on configuration settings can be found on thehttp://ajax.asp.net website.

Hope this helps,

Vivek


Below is the error message, I believe my web server does not have the correct configuration or I did not move out the right .dlls. Thanks alot!

Server Error in '/ajax' 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:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 34: <!--<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->Line 35: <!--<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->Line 36: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 37: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>Line 38: </compilation>


Source File:D:\Inetpub\wwwroot\AJAXEnabledTest1\web.config Line:36

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



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


Below is the error message, I believe my web server does not have the correct configuration or I did not move out the right .dlls. Thanks alot!

Server Error in '/ajax' 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:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 34: <!--<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->Line 35: <!--<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->Line 36: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 37: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>Line 38: </compilation>


Source File:D:\Inetpub\wwwroot\AJAXEnabledTest1\web.config Line:36

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



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


All I needed to do was to install theASP.NET 2.0 AJAX Extensions 1.0 framework, which contains all files needed


Thanks, it woks!

pls help me

hey sir if u find out ur this problem then pls u send me any help related to this

i have also same problem taht my web site works fine on my local machine and it's give error like this on web server

Server Error in '/' 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:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (D:\WebRoot\Domains\rajasthanjewellery.com\wwwroot\web.config line 54)

Source Error:

Line 52: Line 53: <httpModules>Line 54: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 55: </httpModules>Line 56: </system.web>


Source File:D:\WebRoot\Domains\rajasthanjewellery.com\wwwroot\web.config Line:54


Have you installed ASP.NET AJAX on the server? (That's what worked for the original poster.)

No sir i have not installed asp.net ajax on my server

pls tell me how to install asp.net ajax on server.

i don't know how to install it on server.


wish_dev:

No sir i have not installed asp.net ajax on my server

pls tell me how to install asp.net ajax on server.

i don't know how to install it on server.

Check this out:

http://ajax.asp.net/docs/InstallingASPNETAJAX.aspx

Hope this helps,

Vivek


hey sir,

i install asp.net ajax on my local computer and i have also option in for create new web site with ajax enabled.

and i also install asp control toolkit.

my all website works well on my local computer and after made setup it's works fine on my localhost but when i upload this web site i get some problem like this

Server Error in '/' 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:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (D:\WebRoot\Domains\rajasthanjewellery.com\wwwroot\web.config line 54)

Source Error:

Line 52: Line 53: <httpModules>Line 54: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 55: </httpModules>Line 56: </system.web>


Source File:D:\WebRoot\Domains\rajasthanjewellery.com\wwwroot\web.config Line:54


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


You need to log on to the server and run the installer, just like you did on your local machine.

u mean first i upload (ASPAJAXExtSetup.msi) in my httpdocs folder and then i have to install this msi from httpdocs folder.

is it correct or not.


Sure. It doesn't really matter where you download the file, just run it on the actual server.

hello.

you need to install it in the server. however, it looks like you only have access to a folder used to put your web app files. in that case, you must get in touch with the hosting comapny and ask them if they support ajax extensions.

Configuration Error: Could not load type..........

Hi all,

I have an issue with an AJAX.NET enabled web site that i have written. This site was completed and worked fine on our dev server, but then the dev server was rebuilt, and then the fun began. I have reloaded the site onto the newly setup server, installed AJAX.NET (the current version, which i also developed the site under). But the site will not load and i keep getting the follow error

Parser Error Message:Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 51: </controls>Line 52: <tagMapping>Line 53: <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 54: <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 55: <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

I have tried uninstalling and reinstalling AJAX.NET, Moving the 2 AJAX dll's into the projects BIN directory, and also manually putting the 2 AJAX dlls into the GAC, and nothing has made a bit of difference, and so im posting on here......

any help would be greatly appreciated!
Rob Earlam

The validators were removed from the latest release. The default Web.config that comes with the RTM release no longer has the validators in the <tagMapping> element.

Here is a pointer to a blog post that describes how you can download the compatibility validators:http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

Hope this helps,

Scott


All is working fine now

Thanks Alot
Rob


I am working on a team project.

On Other system they haven't got this error.

On my system I have commented the following lines in the web.config {locally}

<!--

<tagMapping>

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="System.Web.UI.Compatibility.RegularExpressionValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="System.Web.UI.Compatibility.RequiredFieldValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="System.Web.UI.Compatibility.ValidationSummary, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</tagMapping> kamran

-->

Then I can't get this error.{I don't know why this error appear on my system and doesn't on other systems}

If i comment these line in my project which all team developer work what could be the result ?

What Should I do ?


Found that on other system there were old ajax installation were installed

So I uninstalled the latest ajax extension and install the old one.

Then as on other system enable the lines above then my application start working on my system.

Now What Should I do .Can I install the new extension on all systems and comments these lines on other system as well.

{I am asking it as Could it lead to some problems or not}

Configuration Error - Unrecoginzed Type

I built an Atlas site on my local machine then moved it out to the server and this is the error I receive. Any ideas?

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:Unrecognized attribute 'type'.

Source Error:

Line 13: -->
Line 14: <configSections>
Line 15: <sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
Line 16: <section name="converters" type="Microsoft.Web.Configuration.ConvertersSection" requirePermission="false"/>
Line 17: <section name="webServices" type="Microsoft.Web.Configuration.WebServicesSection" requirePermission="false"/>

hello.

since you must surelly have the atlas dll in the bin folder, i must ask if you have configured IIS to run asp.net 2.0


Hi Luis:

Would you please see you can help with the following, I have EXACTLY the same problems as Ianem, and do not know what to do next.

Ianem posted:

“I installed atlas on my dev machine and everything works great. When I try
to get it working on the server, I get this error when building the page:
"Request for the permission of type 'System.Web.AspNetHostingPermission,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed"on the line where I have the ScriptManager tag. I set everything up
the same as I did on my dev machine, but nothing works. I added the
reference to the atlas dll in /bin. I registered the assembly on the page.
I installed atlas on the server. Does anyone know what I can do? Thanks.”

I had Microsoft.Web.Atlas.dll in the “bin” and evenScriptLibrary folder in the root of the project as MorningZ suggested, and yes it is configured IIS to run asp.net 2.0 but there is no different at all. Still get the same error messages.

Any suggestion and help is greatly appreciated!!!

Thanks.


I am receiving the same error. And, yes, IIS is running ASP.NET 2.0.

Does anyone have an answer for this issue? Thanks in advance!

...Jim...


hello.

this last error is different from the 1st one. in this case, we're speaking about a permissions problem, which normally occurs due to the fact that the bridgemodule is active. if this is the case, deactivate it or change the permission level of your app (through the <trust> element)


OK, Pardon my ignorance!

Note to self: Verify and THEN answer. I didn't have the site set to run ASP.NET 2.0. It's working now. Thanks!

...Jim...

Configuration Error

I have uploaded my asp.net/ajaxenabled site up to a server and I get this error:

Parser Error Message:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I have checked my c:\windows\assembly folder and the web extensions are there as matching versions. Does anyone have any idea what I need to do to fix this?

thanks,

wdg

Does the server have AJAX extension installed? Microsoft set up AJAX so the files need to reside in the Global Assembly Cache, rather than just being placed in your application's /bin/ folder, which means you/system admin/web host need to install the extensions with the same installer you used to get access to them on your machine.

CONFIGRUE ISA SERVER FOR AJAX

I have a web app that i publihed via ISA Server. The problem is that im loosing the ajax behavior an getting the " error 'sys' is not defined ".

This only happens if i access via internet, and works fine if accesed via intranet.

The question is, what needs to be configured on ISA Server?? I havent found any documentation.

Thanks.

Hi,

It seems the request for javascript or javascript response is blocked by the ISA server.
Please refer tothis for how to set it.
The url for AJAX script looks like?/localhost/ScriptResource.axd.

Thanks a lot Raymod.

Could you please be more specific on what i have to do ?. Im really having a hard time on getting this to run, specially because i

dont have direct access to the ISA server so cant do much testing.

Thanks.


My suggestion is that you contact your company's IT department who has access to it to have it solved.
It's hard for me to give specific actions you need to perform, and I'm not an expert on it too.

conditional UpdatePanel doesnt work

I have the following simple code:

"UpdatePanel2" runat="server" UpdateMode="Conditional"> "Label3" runat="server" Text="Label"> "Button2" runat="server" Text="Button" onclick="Button2_Click">code behind:protected void Button2_Click(object sender, EventArgs e) { Label3.Text ="waiting..."; UpdatePanel2.Update(); Thread.Sleep(5000); Label3.Text ="done"; UpdatePanel2.Update(); }

But it doesn't update the panel until the end. i.e. you don't get to see the "waiting..." text (in fact, you don't see it at all) and then a 5 second pause, then"done". Why doesn't this work? I followed the video and couldn't find a mistake.

Thanks,
Yoni

Because the code in server.

When the system sleeping for 5 second,the runned client html data couldn't send toou client.so you cann't see "waiting...".

When the code in Button2_Click runned out,the html data just send to client,so you can see "done".

And you could change the code to client code as javascript code.

I hope you can understand the reason.Because I'm Chinese.I write English not well.


heyyonidebest,

the onclick event is a server side event , means the Button2_Click method will run at the server so everything happen inside the method you won't see it

the only way to see the situation you are describing is by using client side code


EnigmaOX:

heyyonidebest,

the onclick event is a server side event , means the Button2_Click method will run at the server so everything happen inside the method you won't see it

the only way to see the situation you are describing is by using client side code

I see. I can't convert this to JS because of other reasons. Is there a way to bypass this? Perhaps instead of trying to update the update pannel, I can call another procedure that does it somehow, via JS or else server side script. Is there such a way?

Thanks,
Yoni


Yep , you can use the trigger inside the update panel , plus a timer control

I'm not sure what are u trying to do but you can use the button event to change the text

and to start the timer and using the timer tick event you can fire another method after couple of seconds.


EnigmaOX:

Yep , you can use the trigger inside the update panel , plus a timer control

I'm not sure what are u trying to do but you can use the button event to change the text

and to start the timer and using the timer tick event you can fire another method after couple of seconds.

I see. I tried to create a hidden field object and write the following ValueChanged event:

protectedvoid HiddenField1_ValueChanged(object sender,EventArgs e)
{
UpdatePanel2.Update();
}

I then tried to call the event like this:

protectedvoid Button2_Click(object sender,EventArgs e)
{
Label3.Text ="waiting...";
HiddenField1.ValueChanged +=newEventHandler(this.HiddenField1_ValueChanged);
Thread.Sleep(5000);
Label3.Text ="done";
}

but still it did not work. I set the trigger to:

<asp:AsyncPostBackTriggerControlID="HiddenField1"EventName="ValueChanged"/>

yet still nothing. What am I missing? I don't need a timer because the update isn't based on time. i.e. I want to decide when to update the update panel.


heyyonidebest ,

well you still doing the same mistake , you will change the text of the label twice in the server so you won't see the waiting message

the idea is to change the text once in every event , for example Label.Text = "waiting..."; in the button2 click event and then start the timer control with 5 seconds tick

in the tick event change the text of the label again like Label.Text = "done...";

<asp:Timer ID="Timer1" runat="server" OnTick="timer1_Tick" Interval="5000" >
</asp:Timer>

privatevoid timer1_Tick(object sender, System.EventArgs e)
{
Label1.Text = "done...";
Timer1.Enabled = false; // to stop the timer

}

and use the tick event also to update panel

<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
 
Read more here : http://asp.net/AJAX/Documentation/Live/tutorials/TimerControlWithUpdatePanelsTutorial.aspx

Thanks,EnigmaOX.

But my code it more complicated that this small example. I have a few procedures that do stuff, and in the mean while I want to let the user know what the server is doing (plus so that I can debug). Thus, I can't see how a timer can help me. I can say one thing for sure - I need to let the user know what I doing - and during that time the server will be continuing it's work. Any other idea's how to refresh an update panel during while the server is working?

Yoni


sure , AjaxWink

you can do everything in ajax: webrequests , wcf services , registering postback scripts ect..


Well, how? the example I gave doen't work. can it be done w/o a timer?

Yoni


Take a look at doing it this way:http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/

That's the sort of methodology you're going to need to consider. You can't provide incremental updates during a server call. Like a regular postback, a partial postback only outputs HTML once per round trip.


Better way you can use UpdateProgress Control

http://www.asp.net/ajax/documentation/live/overview/UpdateProgressOverview.aspx

Condition UpdatePanel being refreshed by asp:calendar postback

Hya,

I'm not sure the subject is appropriate but it's what i feel it's happening... I have a server control on UpdatePanel1 that pages a repeater, it his based on this article http://www.codeproject.com/aspnet/CollectionPager.asp although i made a few changes, now it inherits from a compositecontrol, and instead of prerendering the control it Creates Child Controls.


Ok now to the real issue, I have a popup calendar using the PopupControlExtender (having a few problems with the calendar from the toolkit http://forums.asp.net/thread/1547286.aspx) the calendar is inside a conditional updatepanel when the calendar postbacks the collectionpager in the other updatepanel is also refreshed!?!? e.g. it is initialized again and runs the createchildcontrols... Is this expected behaviour or am i doing something wrong?


this is the page code

<asp:Label ID="lblStartDate" runat="server" AssociatedControlID="start_date" Text="Start Date:"></asp:Label><br /> <asp:TextBox ID="start_date" runat="server" CssClass="frm_textbox" Width="150px" ValidationGroup="SearchLatestEvents"></asp:TextBox> <br /> <asp:Panel ID="PanelDatePicker" runat="server"> <asp:UpdatePanel ID="UpdatePanelDatePicker" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Calendar ID="CalendarDatePicker" SkinID="DatePickerSkin" runat="server" Width="160px" OnSelectionChanged="CalendarDatePicker_SelectionChanged"></asp:Calendar> </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <ajaxToolkit:PopupControlExtender ID="PopupControlDatePicker" TargetControlID="start_date" runat="server" PopupControlID="PanelDatePicker" Position="Bottom" /> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate> <table border="1" cellpadding="3" cellspacing="0"> <tr> <th> Header1</th> <th> Header2</th> <th> Header3</th> <th> Header4</th> <th> Header5</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><%# DataBinder.Eval(Container.DataItem, "Column1")%> </td> <td><%# DataBinder.Eval(Container.DataItem, "Column2")%> </td> <td><%# DataBinder.Eval(Container.DataItem, "Column3")%> </td> <td><%# DataBinder.Eval(Container.DataItem, "Column4")%> </td> <td><%# DataBinder.Eval(Container.DataItem, "Column5")%> </td> </tr> </ItemTemplate> <FooterTemplate> </TABLE> </FooterTemplate> </asp:Repeater> <lo9ik:CollectionPager ID="CollectionPager1" runat="server" OnClick="CollectionPager1_Click" PagingMode="PostBack" /> </ContentTemplate> </asp:UpdatePanel>

The repeater is being populated by some random data

I can provide the collectionpager code if you wish. But even reverting to the original version the problem persists so i don't think it's the changes i've done to it.

What's odder about all this is that it only happens when the calendar postbacks! could it be that AJAX is not detecting it's postbacks and is refreshing all the updatepanels??

Your help would be much appreciated...

regards,

Even simpler example:

 <asp:TextBox ID="start_date" runat="server" CssClass="frm_textbox" Width="150px" ValidationGroup="SearchLatestEvents"></asp:TextBox> <br /> <asp:Panel ID="PanelDatePicker" runat="server"> <asp:UpdatePanel ID="UpdatePanelDatePicker" ChildrenAsTriggers="true" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Calendar ID="CalendarDatePicker" SkinID="DatePickerSkin" runat="server" Width="160px" OnSelectionChanged="CalendarDatePicker_SelectionChanged"></asp:Calendar> </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <ajaxToolkit:PopupControlExtender ID="PopupControlDatePicker" TargetControlID="start_date" runat="server" PopupControlID="PanelDatePicker" Position="Bottom" /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"> <ContentTemplate> This panel should not be updated on date select!... <asp:UpdateProgress ID="UpdateProgress1" runat="server"> <ProgressTemplate> Updating... </ProgressTemplate> </asp:UpdateProgress> </ContentTemplate> </asp:UpdatePanel>

Code Behind:

protected void CalendarDatePicker_SelectionChanged(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); PopupControlDatePicker.Commit(CalendarDatePicker.SelectedDate.ToString("dd MMM yyyy")); }

Could please someone explain me what am i doing wrong? I have no triggers setup on UpdatePanel1, there's no reason for it to be updated when the calendar postback!!...

On my machine, UpdatePanel1 isnotbeing updated. I think you're being confused by the fact that your UpdateProgress control is showing. You probably want to put AssociatedUpdatePanelID="Update1" on it so that it only shows up when UpdatePanel1 is generating an async postback. Right now, since it's not associated with any particular UpdatePanel, it shows up on any async postback, so that's why you're seeing it appear.


Hi Steve,

Thanks for your contribution, I indeed realized that is true, but using the first example, my server control (collectionpager) still gets "refreshed"!... And that is actually what is causing the problems... On every createchildcontrols it goes through the pageddataset and adds the links/buttons for the functionality, because it is being "refreshed" and the dataset is not being databound it causes exceptions. I don't want to have to rebind the dataset everytime the calendar is used!..

I hope this makes things a bit clearer, if you want i can send you a full working example...


Kind Regards,


Maybe I understand... remember that when you use an UpdatePanel, there's an entire postback on the server. Try removing the UpdatePanels and get it to work that way first. From your last description, it sounds like your page won't work using regular postbacks, which means it also won't work when using async postbacks.


Spot on Steve, it was the way the control was built, it was databinding the repeater on it's onprerender method, causing it to create expections because the dataset was empty after a postback, i ended up removing the databind from within the control and instead use it to page the dataset and display the navigation...

So this means that all controls are in reality rendered again even if the postback is not for it's updatepanel!... It's slightly confusing as i expected that only the updatepanel to be updated should be "refreshed"...

Thanks for your help...


Glad you got it figured out!

Yup, during an async postback, the entire page gets rendered on the server, but only the part inside the UpdatePanel comes back down to the client.


Okay... so now we knowwhy it is happening. But is there any way to stop it happening? I have exactly the same issue.

It would be nice if there was some seperation and control over what UpdatePanels caused what UpdateProgresses to fire in the case where UpdatePanels are nested.

Or, a property on an UpdatePanel which simply says 'TriggerUpdateProgress' which can be set to false.

Wednesday, March 21, 2012

composite control in a updatepanel.

hi All,

Iam having a server control ( without any .ascx file), the contains other user controls, and renders some html by overriding CreateChildControls method of the control.

In the Child control, i just create an htmlTable object, add a couple of rows etc., these rows contain some link buttons for which i also add the event handler.

When the code is not inside update panel, it works fine, it posts back, raises events and renders back correctly.

When i put the control inside a updatepanel, it posts back ( in the background), i can debug and see that events are being fired, but its doesnt refershes the screen. I have my update panel's mode property set to always, and iam using april ctp.

Also if i add update panel in the control itself , it complains that update panel should be there before page_init is done, now i need to rerender the control because of the events on it

Do i need to implement some other interface or register my control somewhere for it to work ?

this has become a major bottleneck in my project, where we are trying to use atlas for our future product versions, any help would be greatlty appreciated.

thanks

You said it does postback, did you use Fiddler to check if it returns right data? some xml wrapped in delta tag.

Well i dont know if its posting right data or not, but i can confirm that the server side event gets raised, by debugging ( i can check with fiddler later today)

i also tried registering the controls with script manager's RegisterControl, and RegistercontrolAsync methods, but they dont result in ajax behavior.

Iam wondering as to what is the recommended way of developing components with Atlas, and if there are any examples posts out there ..

thanks


This doesn't seem like an Atlas Control Toolkit question - perhaps you'll have better luck in one of the Atlas forums.

Composite Control Examples?

Does anyone have any examples of using ASP.NET Ajax with Composite Controls or custom server controls?

Thanks.

3 samples here:

http://alpascual.com/blog/al/archive/2006/06/19/The-power-of-CompositeControl.-Another-skeleton-class-.aspx

http://alpascual.com/blog/al/archive/2006/09/28/Creating-an-Atlas-control-is-not-very-well-described-anywhere_2C00_-centralize-documentation-please_2100_.aspx

http://alpascual.com/blog/al/archive/2006/09/06/Dropdown-with-checkbox-for-ASP.NET-2.0.aspx

Composite Control and CalendarExtender error

I'm trying to create a server control that wraps up a TextBox, calendar Image, and a AJAX 1.0 CalendarExtender. Here is a section of the code:

protected override void CreateChildControls() {txtDate.Width = 75;Controls.Add(txtDate);imgCal.ImageUrl= _iconURL;imgCal.ImageAlign= ImageAlign.AbsMiddle;Controls.Add(imgCal);calEx.PopupButtonID= imgCal.UniqueID;calEx.TargetControlID= txtDate.UniqueID;Controls.Add(calEx);}

Here is the runtime error I am getting:

"'_behaviors' is null or not an object"

Any ideas?

Looks like there is a little information about adding the behaviors here:

http://forums.asp.net/thread/1293293.aspx#13

But this leeds me to believe I need a client script on every page I plan to have this control. Which isn't really acceptable.

Is there a way to wrap it up in one compiled control?


Did you have any luck doing this? I'm in the process of doing the exact same thing.

Also, I'm having problems finding the Calendar Extender control to dynamically add it. I'm sure I'm missing something. I've tried adding references to the AjaxControlToolkit and the AJAXExtensionsToolbox, but no luck in finding it. I do see the AjaxControlToolkit namespace and several controls under it, just no Calendar.

Thanks In Advance!


Firgured out the problem... somehow the older version of the AjaxControlTool.dll got in there.

I got it working great!

Complication Running AJAX ASP.NET on a currnet ASP.NET Web Server?

Hi there i'm currently busy converting a ASP.NET web site to a AJAX ASP.NET site.

I just want to know what is the prerequisites for copying, or publishing a AJAX ASP.NET site on a Web Server currenly configured to run ASP.NET?

What should i do?

Is there any unforseen problems that might come ot light down the line?

Please can someone help me...

THANKS

SJB

You will first have to install the AJAX framework on the web server, which can be foundhere.


Do you know of any other complications down the line?

After the AJAX framework has been installed?


Not that I've come across.


thx...


Hi s_j_b,

To converting a web site to AJAX ASP.NET site.It is recommended to do these steps as below:

1. Install Asp.Net AJAX Extension. The introduction is here: http://ajax.asp.net/docs/InstallingASPNETAJAX.aspx (not necessary)

2. Add a reference to the "System.Web.Extensions.dll " in your project. (In common, the dll is in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025).

3. Modify your web.config file. Please follow this: http://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx

Hope it helps , if any problems or has been resolved yet , please let me know.

Complex Type Serialization problem client -> server

I built a real simple sample that downloads an object to the client, then sends the object back up to the server. I love how easy this is, but there's a problem with the upload:
Here's what comes down:
{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West Wind","Entered":new Date(2005,8,25,1,10,16)}
and here's what goes back up:
{"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West Wind","Entered":{}}}
Notice the Entered date is no longer set isn't serialized properly - it's empty and on the server side a failure occurs.
This brings up another question: What hapens on an exception? Right now a 500 error and an HTML error page goes back. There's no trigger and no error nothing that happens on the client side page?
+++ Rick --More info...
The failure above doesn't seem to be related to the date field even - it looks like complex types do not marshall up at all. Even doing this on the client:

function btnSaveCustomer_Click()

{

var Customer =new Westwind.AtlasTest.busCustomer();

Customer.Name = document.getElementById("txtName").value;

Customer.Company ="West";

// Customer.Entered =new Date(2005,8,26,20,54,56);

alert(Customer.Entered);

Service = Westwind.AtlasTest.SimpleService.SaveCustomer(Customer,btnSaveCustomer_Click_Complete,btnSaveCustomer_Click_Complete);

returnfalse;

}

Fails. What goes up to the server looks right (I assume) and it's apparently picking up the type properly:

{"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}
Here's what I get back:

<html>

<head>

<title>error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}</title>

<style>

body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}

p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

pre {font-family:"Lucida Console";font-size: .9em}

.marker {font-weight: bold; color: black;text-decoration: none;}

.version {color: gray;}

.error {margin-bottom: 10px;}

.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

</style>

</head>

<body bgcolor="white">

<span><H1>Server Error in '/atlastest' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>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.

<br><br>

<b> Exception Details: </b>System.ArgumentException: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code>

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.</code>

</td>

</tr>

</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code><pre>

[ArgumentException: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}]

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo) +1103

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeInternal(JavaScriptString s, Type type) +248

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo) +673

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeRequestParameters(String input, IDictionary`2 paramTypeInfo, IJavaScriptSerializationContext context) +107

Microsoft.Web.Services.RestHandler.ProcessRequest(HttpContext context) +92

Microsoft.Web.Services.HandlerWrapper.ProcessRequest(HttpContext context) +10

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +317

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65

</pre></code>

</td>

</tr>

</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.26; ASP.NET Version:2.0.50727.26

</font>

</body>

</html>

<!--

[ArgumentException]: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeInternal(JavaScriptString s, Type type)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeRequestParameters(String input, IDictionary`2 paramTypeInfo, IJavaScriptSerializationContext context)

at Microsoft.Web.Services.RestHandler.ProcessRequest(HttpContext context)

at Microsoft.Web.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


The Web Service is simple as can be for this:

[WebMethod]

publicbusCustomer GetCustomer()

{

//throw new SoapException("Failure dude!", SoapException.ServerFaultCode);

returnnewbusCustomer();

}

[WebMethod]

publicstring SaveCustomer(busCustomer Customer)

{

return Customer.Name;

}


Hi Rick,
I investigated this, and it is indeed a bug in the Atlas serialization code. In order for it to work correctly in its current form, you need to make sure that the fields you set into your client object (in your case Name and Company) have a matching publicproperty on the server object. Fields are not supported at this time, and maybe that's what you are using. If so, just switch to a property and you should be on your way. Thanks for reporting this issue, as it's definitely something we wnat to have fixed.
As for the fact that error reporting is lacking, it is one of those things that we didn't get to implement yet, but will be included in the next release.
Hope this helps,
David

Complex page with slider control works locally, but breaks when run from production server

I have my ASP.NET 2.0 AJAX product working fine on my local machine. However, when I upload it to our production server and run it from there, I get the following Javascript error when the page first loads:

IE: "Microsoft JScript runtime error: Object doesn't support this property or method"
Firefox: "this.control.get_text is not a function"

It occurs on line 239 of the Slider control's WebResource.axd:

var _elementValue = Number.parse(this.control.get_text());

When running locally, the runs under the VS2005 built in web server athttp://localhost:xxxx/MyGossip/. The production server's address is ishttp://production/MyGossip/.

The page source is as follows (there are a couple of trivial web service methods in the code behind that are not shown):

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<%@dotnet.itags.org. Register Assembly="RadTabStrip.Net2" Namespace="Telerik.WebControls" TagPrefix="radTS" %>
<%@dotnet.itags.org. Register src="http://pics.10026.com/?src=Stars.ascx" TagName="Stars" TagPrefix="uc1" %>

<!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" >
<head runat="server">
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Results.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Default.css" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=Rating.css" />
<title>MyGossip - Search tours</title>
</head>
<body>

<form id="Form1" runat="server">

<atlas:ScriptManager ID="s1" EnablePartialRendering="true" runat="server">
<Scripts>
</Scripts>
</atlas:ScriptManager>

<table align="center" style='width:800px;'>
<tr>
<td>
Min rating
</td>
<td colspan="2">
Max cost (0 for none)</td>
<td style='width: 199px'>
<atlas:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<span id="DivProgress" style='font-size:90%; position:relative; top:-9px; left:200px; background-color:#666699;color:white; font-weight:bold;padding:3px;'>
Loading...
</span>
</ProgressTemplate>
</atlas:UpdateProgress>

</td>
</tr>
<tr>
<td style='width:300px;'>

<asp:DropDownList ID="DropDownListRating" runat="server" AutoPostBack="True" CssClass="textbox" Visible="false">
<asp:ListItem Value="0">All ratings</asp:ListItem>
<asp:ListItem Value="1">At least *</asp:ListItem>
<asp:ListItem Value="2">At least * *</asp:ListItem>
<asp:ListItem Value="3">At least * * *</asp:ListItem>
<asp:ListItem Value="4">At least * * * *</asp:ListItem>
<asp:ListItem Value="5">At least * * * * *</asp:ListItem>
</asp:DropDownList>


<atlasToolkit:Rating ID="RatingMinRating" runat="server"
CurrentRating="0" Direction="LeftToRight" ReadOnly="false" StarCssClass="ratingStar"
WaitingStarCssClass="savedRatingStar" FilledStarCssClass="savedRatingStar" EmptyStarCssClass="emptyRatingStar">
</atlasToolkit:Rating>


</td>
<td style='width:1px;'>
<asp:TextBox ID="SliderMaxCost" runat="server" style='width:80px;' AutoPostBack='true'></asp:TextBox>
</td>
<td style='width:80px;'>
<asp:TextBox ID="TextBoxMaxCost" runat="server" MaxLength="5" Columns="5" AutoPostBack="true" CssClass="textbox"></asp:TextBox>
<atlasToolkit:SliderExtender ID="SliderExtender1" runat="server">
<atlasToolkit:SliderProperties TargetControlID="SliderMaxCost" BoundControlID="TextBoxMaxCost"
Decimals="0" Minimum="0" Maximum="1000" Length="80" /></atlasToolkit:SliderExtender>
AUD
</td>
<td style='text-align:right;'>
<asp:Button ID="Button1" runat="server" Text="Update" />
</td>
</tr>
<tr>
<td colspan="4">

<atlas:UpdatePanel ID="UpdatePanelResultGrid" runat="server">

<Triggers>
<atlas:ControlEventTrigger ControlID="RatingMinRating" EventName="Changed" />
<atlas:ControlEventTrigger ControlID="Button1" EventName="Click" />
</Triggers>

<ContentTemplate>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
style='width:100%' CellPadding='4' AllowPaging='True' AllowSorting='True'>
<Columns>
<asp:TemplateField HeaderText="Activity" SortExpression="name">
<ItemTemplate>
<span class="ResultTitle">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("name") %>'></asp:Label>
</span>
<br />
<asp:Label ID="Label3" runat="server" Text='<%# Bind("description") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="duration" HeaderText="Duration" SortExpression="duration" />
<asp:BoundField DataField="departs" HeaderText="Departs" SortExpression="departs" />
<asp:BoundField DataField="price" DataFormatString="{0:0.00} AUD" HeaderText="Cost"
SortExpression="price" />
<asp:TemplateField HeaderText="Rating" SortExpression="rating">

<ItemTemplate>
<uc1:Stars ID="Stars1" runat="server" Rating='<%# Eval("rating") %>' />
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButtonShowDetails" runat="server" Text="more"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderDetails" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonShowDetails"
PopupControlID="PanelPopupDetails"
DynamicControlID="LabelPopupDetailsDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="GetContent"
OkControlID="ButtonPopupDetailsClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>

|

<asp:LinkButton ID="LinkButtonAddToShortlist" runat="server" Text="shortlist"></asp:LinkButton>
<atlasToolkit:ModalPopupExtender ID="ModalPopupExtenderShortlist" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButtonAddToShortlist"
PopupControlID="PanelPopupShortlist"
DynamicControlID="LabelPopupShortlistDynamic"
DynamicContextKey='<%#Eval("name")%>'
DynamicServiceMethod="AddToShortlist"
OkControlID="ButtonPopupShortlistClose"
BackgroundCssClass="ModalBackground" />
</atlasToolkit:ModalPopupExtender>

</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>
</ContentTemplate>

</atlas:UpdatePanel>

</td>
</tr>
</table>

<asp:Panel ID="PanelPopupDetails" runat="server" style='display:none;' CssClass='Popup'>
<h3>
<asp:Button ID="ButtonPopupDetailsClose" runat="server" Text="Close" style='float:right' />
<asp:Label ID="LabelPopupDetailsDynamic" runat="server" />
</h3>

<radTS:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0"
Align="justify"
style='margin-bottom: -1px;'>
<Tabs>
<radTS:Tab runat="server" Text="Tour details"></radTS:Tab>
<radTS:Tab runat="server" Text="Reviews"></radTS:Tab>
<radTS:Tab runat="server" Text="Pricing"></radTS:Tab>
</Tabs>
</radTS:RadTabStrip>
<radTS:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
style='BORDER:solid 1px #BBBBBB; width:95%; padding:20px; background-color:#FAFAFA;'>
<radTS:PageView ID="PageView1" runat="server" Width="100%">
<div>
<h3>
<img src="http://pics.10026.com/?src=images/bus.png" style='float:right; margin-left:20px;margin-bottom:10px;' alt='' />
Tour details
</h3>

<ul>
<li class="style4">1 Hour Daintree River Cruise<br />
</li>
<li class="style4">Hand feed kangaroos<br />
</li>
<li class="style4">Lunch at a freshwater creek<br />

</li>
<li class="style4">4WD the "Bloomfield Track"<br />
</li>
<li class="style4">Small & personalised </li>
</ul>
<p class="style14">Your naturalist guide will meet you at your accommodation at around 7am.
The first 1/2 of the journey north is very scenic with beautiful ocean views in contrast with the lush
farmland around Mossman. After morning tea you will learn about the mangrove rainforests, and hopefully
observe local wildlife including the Estuarine Crocodiles on the Daintree River Cruise. </p>

<p class="style14">This tour offers a little more. It takes you beyond Cape Tribulation along the 4WD
only 'Bloomfield Track', allows time for a swim in the Coral Sea at Cape Tribulation (seasonal).
There is no set timetable. You can enjoy elevated walks through the Cape Tribulation National Park
with experienced guides who allow ample time for questions and photographs. While you are taking a swim
in a tranquil freshwater stream the BBQ lunch is prepared then served with home made salads, tropical
fruit and Australian wine. You will probably see fish and turtles in the creek, butterflies and exotic
birds in the trees and often Goannas on the forest floor all at the luncheon site. On the way home enjoy
a short afternoon refreshment stop where you can pat a Kangaroo, scratch a cockatoo, have a cold beer or
sip a cup of local tea. Return to Cairns by 6:30pm. </p>
</div>
</radTS:PageView>
<radTS:PageView ID="PageView2" runat="server" Width="100%">
<div>
<h3>Reviews</h3>
<p><strong>Samantha, 22, Canada</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Our tour guide Geoff was amazing and the size of the group was just right. I would definitely recommend this tour
to backpackers.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

<p><strong>Keith, 24, Ireland</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
I only had two days in cairns, so this tour was perfect for me. If you're looking for a way to pack in as much
as you can in one day this would be the tour for you.</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

<p><strong>Felicia, 19, UK</strong>
<img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img
src="http://pics.10026.com/?src=Images/Stars/star_on.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_half.png" /><img src="http://pics.10026.com/?src=Images/Stars/star_off.png" />
</p>
<p>
Make sure you know what the weather is going to be like before you book this tour, it rained the whole time we were
there. But our tour guide made me most of it and was really enternaining.
</p>
<p>Helpful? <input type="button" value="Yes"/ > <input type="button" value="No"/ ></p>

</div>
</radTS:PageView>
<radTS:PageView ID="PageView3" runat="server" Width="100%">
<div>
<h3>Pricing</h3>
<p>All prices shown in Australian Dollars, valid from 1 April 2006 until 31 March 2007</p>
<table width="400" border="0" cellpadding="5" cellspacing="0">
<tr>
<th align="left" ><span class="style15"></span></td>
<th align="center"><span class="style1">Adult</span></td>

<th align="center"><span class="style1">Child</span></td>
<th align="center"><span class="style1">Family</span></td>
</tr>
<tr>
<th align="right"><span class="style1">Safari, Pensioner</span></td>
<td align="center"><span class="style1">$ 135</span></td>
<td align="center"><span class="style1">n/a</span></td>

<td align="center"><span class="style1">n/a</span></td>
</tr>
<tr onmouseover="return escape('Daintree/Cape Tribulation/4WD Bloomfield Track')">
<th align="right"><span class="style1">One Day Safari</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>

</tr>
<tr>
<th align="right"><span class="style1">One Day Safari ex Port Douglas</span></td>
<td align="center"><span class="style1">$ 145</span></td>
<td align="center"><span class="style1">$ 95</span></td>
<td align="center"><span class="style1">$ 440</span></td>
</tr>
</table>

</div>
</radTS:PageView>
</radTS:RadMultiPage>

</asp:Panel>


<asp:Panel ID="PanelPopupShortlist" runat="server" style='display:none;' CssClass='Popup'>
<h3>
Trip added!
<asp:Button ID="ButtonPopupShortlistClose" runat="server" Text="Close" style='float:right' />
</h3>
<h4>Your shortlist is as follows:</h4>
<ul>
<asp:Label ID="LabelPopupShortlistDynamic" runat="server" />
</ul>
</asp:Panel>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyGossipConnectionString %>"
ProviderName="<%$ ConnectionStrings:MyGossipConnectionString.ProviderName %>"
SelectCommand="SELECT [name], [description], [duration], [departs], [price], [no_days], [rating] FROM [Tour] WHERE (([rating] >= @dotnet.itags.org.rating) AND (@dotnet.itags.org.price = 0 OR [price] <= @dotnet.itags.org.price))">
<SelectParameters>
<asp:ControlParameter ControlID="RatingMinRating" DefaultValue="0" Name="rating"
PropertyName="CurrentRating" Type="Decimal" />
<asp:ControlParameter ControlID="TextBoxMaxCost" DefaultValue="0" Name="price"
PropertyName="Text" Type="Decimal" />
</SelectParameters>
</asp:SqlDataSource>

</form>

</body>
</html>

Any help appreciated.

Mike

Hi,

since the code is working on the local environment, it doesn't seem a problem related to the Slider, but instead to the production environment. Please check that all the client files are correctly sent to the browser.


I pointed an HTTP sniffer at requests made to both the local and remote sites, but as far as I can see, the same AXD requests are successfully made both on the local and remote machines. A total of 13 MS Ajax / Atlas control kit files are downloaded from h my test server and the production server:

MS client side library (beginningfunction WebForm_PostBackOptions...)

Hi,

there seems to be a problem with the markup rendered by the extender:

<control id="SliderMaxCost"> <behaviors> <slider:SliderBehavior ... /> </behaviors></control>
This is strange because it should render a textBox element rather than a control (the extender base class takes care of this). Rendering a control means that that the text property is not defined, and it crashes. I'll investigate and follow-up as soon as possible.

Hi,

please check if you' ve got an older version of the Control Toolkit on your production machine. You must have the September release assembly in order to use the Slider extender.


I just file copied the entire project folder structure from the development machine to the production server. The fact that the HTTP sniffer shows the slider behaviour javascript file being downloaded surely indicates that the correct version is installed.

Any other ideas?

Mike


Hi,

it can happen when embedding a new extender in a previous version of the Control Toolkit and then recompiling, for example. However, it seems not your case. I'll continue to investigate.


Thanks for taking the time with this. I simplified the problem and posted it as a new question, which may make your investigations easier:

http://forums.asp.net/thread/1420009.aspx

Cheers,

Mike

Completely Atlas-enable a web page

When you Atlas-enable a control you need to specify a <trigger> control event that will process the server post-back request using Ajax... However, what I need is to complete Atlas-enable a page so ANY user activated event will be processed using Ajax, without having to specify triggers for each action.

Is this possible??

hello,.

i'm not really sure if this is what you want, but if you want all the server controls (which map to html controls) to initiate a partial postback, then put everything inside an updatepanel...


hello again.

posted too soon...where you read which map to html controls should be which map to html controls and/or implemente Ipostbackeventhandler...