Showing posts with label ctp. Show all posts
Showing posts with label ctp. Show all posts

Wednesday, March 28, 2012

ASP.NET AJAX in Orcas January CTP

What's the state of ASP.NET AJAX in the Orcas January CTP? It seems to be completely hosed.

I not to know what status is in orcas but feel that ms AJAX solutions are way behind others frameworks.

For me when creating the sites I to useComfortASP.NET and when creating ajax application I useVisual WebGui

The Visual WebGui is less known but i say many good words as I love it too much. I lets develop web applicaion like WinForm application.

Ramanjit

ASP.NET Ajax CTP version and .NET 3.0?

Does anybody know if the CTP version of the ASP.NET Ajax works with .NET 3.0?

It should work Since basic framework(CLR version) used by both ASP.NET AJAX and .NET3.0 is .NET 2.0.

Monday, March 26, 2012

asp.net ajax beta 1.0 dont recognize me the AutoCompleteExtender

hello

I need your help, i was working with the atlas last atlas CTP, but whe I read about asp.net ajx beta 1.0 , I changed my project to the nwe version but the AutoCompleteExtender doen't work , I install the latest CTP and I make areference to the Microsoft.Web.Preview.dll but I doesn't work , the error is that the tag is not recognized...

my code is:

<asp:AutoCompleteExtenderID="AutoCompleteExtender1"runat="server"

TargetControlID="txtProd"

ServicePath="~/Services/Services.asmx"

ServiceMethod="Find"MinimumPrefixLength="1"/>

Hi,

have you registered the namespace in your aspx page?

<%@. Register TagPrefix="ajaxPreview" Namespace="Microsoft.Web.Preview.UI.Controls" Assembly="Microsoft.Web.Preview" %>

Hi,

I had the same problem and the solution did the trick.

Thanks,

ASP.NET AJAX Beta 1 and Adding a ScriptManager dynamically

I just upgraded to ASP.NET AJAX Beta 1 from the July CTP and am having problems with dynamically adding a ScriptManager to my page. It was working fine before I upgraded.

What I was doing before was this: I created a new class that inherited from Page and in the constructor of that class I created a ScriptManager object and add it to the Controls collection. That was working fine before. Since the upgrade, I am getting the following error when trying to add the ScriptManager in the constructor:

Control 'ctl00' of type 'ScriptManager' must be placed inside a form tag with runat=server.

So I tried adding the ScriptManager to the Form.Controls collection during the page's Init event, but then I got this error because I have an UpdatePanel on the page:

The control with ID 'UpdatePanel1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

So my question is how do I dynamically add a ScriptManager to the Form.Controls collection before an AJAX control checks for it?

Thanks!

hello.

well, you must add it before the updatepanel is added to the page. try using the preinit event and let us know if it works.


I tried to add it to the page during the PreInit event as well, since the AJAX controls apparently verify that a ScriptManager is on the page between the PreInit and Init events. Unfortuantly during the PreInit event the Form property of the page has not been created yet. So if I add the ScriptManager to the page's Controls collection as opposed to the Form.Controls collection during the PreInit event I get the same error that I stated above:

Control 'ctl00' of type 'ScriptManager' must be placed inside a form tag with runat=server.

Do you see any way around this?

Thanks for your response!


hello.

hum...can you post a small demo page which reproduces the problem while adding the scritpmanager dynamicaly?

thanks.


Yeah sure. Here is a very small example that shows the problem I am having. If I try to add the ScriptManager in the page's constructor then I get the error message about it having to be in between the page's form tags. If I create the ScriptManager during the PreInit event I get an error that says the UpdatePanel needs a ScriptManager. By the way, the project I created for this demo was from the ASP.NET AJAX CTP-Enabled Web Site template.

ASPX Page:

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Script Manager Test</title></head><body> <form id="form1" runat="server"> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> Testing... </ContentTemplate> </asp:UpdatePanel> </div> </form></body></html>
Code Behind:
 
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using Microsoft.Web.UI;public partialclass _Default : Page {public _Default() {//This tells me the ScriptManger must be in between the Form tags //if (ScriptManager.GetCurrent(this.Page) == null) //{ // ScriptManager Manager = new ScriptManager(); // Manager.EnablePartialRendering = true; // this.Controls.Add(Manager); //} }protected override void OnPreInit(EventArgs e) {if (ScriptManager.GetCurrent(this.Page) ==null) { ScriptManager Manager =new ScriptManager(); Manager.EnablePartialRendering =true;this.Controls.Add(Manager); }base.OnPreInit(e); }}


Try this:

if (ScriptManager.GetCurrent(this.Page) ==null)
{
ScriptManager Manager =new ScriptManager();

Manager.ID = "SM";
Manager.EnablePartialRendering =true;
this.Controls.Add(Manager);
}


Actually, you'll need to ensure that the ScriptManager is first in the page. For example:

<%@.PageLanguage="C#"AutoEventWireup="true" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headid="Head1"runat="server">

<title>Script Manager Test</title>

</head>

<scriptrunat="server">

protectedoverridevoid OnPreInit(EventArgs e) {

if (ScriptManager.GetCurrent(this.Page) ==null) {

ScriptManager Manager =newScriptManager();

Manager.EnablePartialRendering =true;

SMPlaceHolder.Controls.Add(Manager);

}

base.OnPreInit(e);

}

protectedvoid trigger_Click(object sender,EventArgs e) {

label.Text ="Async post";

}

</script>

<body>

<formid="form1"runat="server">

<div>

<asp:PlaceHolderID="SMPlaceHolder"runat="server"/>

<asp:Buttonrunat="server"Text="Click"ID="trigger"OnClick="trigger_Click"/>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<Triggers>

<asp:AsyncPostBackTriggerControlID="trigger"/>

</Triggers>

<ContentTemplate>

<asp:Labelrunat="server"Text="Get"id="label"/>

</ContentTemplate>

</asp:UpdatePanel>

</div>

</form>

</body>

</html>


That did not fix the problem. It still gives me the following error:

The control with ID 'UpdatePanel1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

If I remove the UpdatePanel from the page it then gives me this error message:

Control 'SM' of type 'ScriptManager' must be placed inside a form tag with runat=server.


Thanks, SimonCal, that worked to add the PlaceHolder and then add the ScriptManager to it, but that defeats the whole purpose of what I am trying to accomplish. I want to create a base class that inherits the Page class and have the ScriptManager automatically added. That way I can create a new page that inherits my base class and not have to worry about adding the ScriptManager manually every time. Before the beta came out I could add the ScriptManager to the page's Controls collection and it worked perfectly. Now the ScriptManager has to be in the form tags. Is there anyway to accomplish this?

Thanks for your help.


If you have to do it in a generic way from a base class - you can try the following

<%@.PageLanguage="C#"AutoEventWireup="true" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headid="Head1"runat="server">

<title>Script Manager Test</title>

</head>

<scriptrunat="server">

protectedoverridevoid OnPreInit(EventArgs e) {

if (ScriptManager.GetCurrent(this.Page) ==null) {

ScriptManager Manager =newScriptManager();

Manager.EnablePartialRendering =true;

foreach (Control cinthis.Controls)

{

if (cisHtmlForm)

form1.Controls.AddAt(0, Manager);

}

}

base.OnPreInit(e);

}

protectedvoid trigger_Click(object sender,EventArgs e) {

label.Text ="Async post";

}

</script>

<body>

<formid="form1"runat="server">

<div>

<asp:Buttonrunat="server"Text="Click"ID="trigger"OnClick="trigger_Click"/>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<Triggers>

<asp:AsyncPostBackTriggerControlID="trigger"/>

</Triggers>

<ContentTemplate>

<asp:Labelrunat="server"Text="Get"id="label"/></ContentTemplate>

</asp:UpdatePanel>

</div>

</form>

</body>

</html>

Thanks,

Kashif


That did the trick! That's exactly what I was looking for. Thank you very much, kashif!

How do you do this from inside a control? Like.....check to see if its there, then if its not then place it on the page that contains you Atlas control...?


protectedoverridevoid OnPreInit(EventArgs e)

{

if (ScriptManager.GetCurrent(this.Page) ==null)

{

ScriptManager Manager =newScriptManager();

Manager.EnablePartialRendering =true;

foreach (Control cinthis.Controls)

{

if (cisHtmlForm)

{

c.Controls.AddAt(0, Manager);

}

}

}

base.OnPreInit(e);

}

use this code in base class

don't write code in html file

don't hardcode form name in code

thank u


Similar thread:

Is it possible to add a ScriptManager to a page dynamically?

ASP.NET AJAX 1.0 RC without AJAX Futures December CTP

I want to keep my web application's overhead as small as possible. In the Asp.Net Ajax "Get Started" page, I notice the order of setup is different:http://ajax.asp.net/default.aspx?tabid=47

I want to know does it mean that "ASP.NET AJAX Control Toolkit" doesn't need "AJAX Futures December CTP"?

Thanks!

It (The Toolkit) does not need the Futures CTP.

Saturday, March 24, 2012

ASP.Net 2.0 AJAX Futures December CTP features Timeframe

OK, I know in advance this may be a bad question, as everyone is concerned right now with getting version 1.0 out of RC. However I have to ask: what is the (very) general time frame/plan for the features listed in "ASP.Net 2.0 AJAX Futures December CTP" to be released? Is this the beginning of the next major MS AJAX version, Or is this considered a supplemental release to the current version? Should I plan on (for example) a years worth of development before the next major release? Or is this considered a supplemental build, and we will perhaps have a quicker turn around time? The name of the CTP ("2.0") leads me to believe we are talking about the next major version, which leads me to believe some of these 2.0 features may not be supported for about a year? Am I mistaken? Comments?

I know, I know, let's get 1.0 out there first, I agree. (Yes, great work to MS on 1.0). However it would be nice to know if I should plan on waiting a year before I can officially roll out some of the features listed in version 2.0. I apologize in advance knowing this surely has already been discussed, but I can not find an article/forum post/blog entry. Perhaps someone can provide some links? My boss was specifically asking about one of the features in 2.0, specifically Auto complete. Thanks,

David

ASP.NET AJAX 1.0 — Provides the core ASP.NET 2.0 AJAX Extensions and Microsoft AJAX Library for creating AJAX-style applications with either server-centric or client-centric development models. At final release, this package will be fully supported by Microsoft Premier Support Services.

Wednesday, March 21, 2012

ASBXScriptMap w/ December Futures CTP

I am getting an error on the ASBXScriptMap when installing the December
Futures CTP. I will assume that this is an error on setting up the script
mapping. I am running onWindows XP with VS.NET 2k5. Is there any info on
manually setting up the ASBX ScriptMap?

Wally



Watch an intro to Atlas Beta 2 @dotnet.itags.org. http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2006/11/20/748.aspx
Listen to the ASP.NET Podcast @dotnet.itags.org. http://www.aspnetpodcast.com/

I am also getting this error when trying to run the same installer...

Anybody?

Are we going to have a next CTP?

Or the next release will be the 1.0 version?

Another CTP is comingaccording to the last reply on this topic... hopefully just in time for DevConnections :-)