Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Wednesday, March 28, 2012

Extenders not visible?

Hello. I'm new to the Microsoft developer environment...very new.

I installed Visual Web Developer 2008 as well as the AJAX Control Toolkit (3.5 with source). I installed the Toolkit and have all of the available mods in a separate tab. I added the script manager above the default form tag. If I drag and drop a standard button onto the platform I am not getting the arrow icon to view available extensions.

Is there something obvious I am missing?

Hi there,

The script manager should be placed just after the form tag, not above form tag. Please correct it.

Srinath
Dont forget to click "Mark as Answer" on the post that helped you.
It marks your thread as Resolved so we will all know you have been helped.


Moved the script manager below the form tag. Still no luck. Any other suggestions?


Hi, got the same issue. The Toolkit is installed but when I mark a button, I get no "Button task" where I can select Extenders. I run VS 2008 Prof.

L.


Lokaboy keep me posted if you will. If I find some help i'll PM you right away.


Sure :-) Thanks

Extender web service method is called differently

For a reason i do not understand, i have a web service which the the signature corresponds to what it is supposed to be (I see the signature everywhere) and this extender calls a completly different web method signature...

The extender is the cascading drop down list extender, it is supposed to call :

Public

Function GetDropDownContents(ByVal knownCategoryValuesAsString,ByVal categoryAsString)As AjaxControlToolkit.CascadingDropDownNameValue()

But instead it calls :

Public

Function GetDropDownContents()As AjaxControlToolkit.CascadingDropDownNameValue()

What this does is that it prevents me from knowing what values where already selected. Usually, this could be done by parsing the knownCategoryValues but since i don't get this param anymore, i'm a bit clueless at how to do this.

Can anyone help me understand this problem?

Hi,

I think ASP.NET AJAX will actually fail if it can't find a matching signature (this includes correctly cased parameter names). I'm guessing something else is the culprit here. You might want to take a look at your CascadingDropDown declaration to make sure it's calling the web service you're expecting (and when in doubt, compare against the sample website).

Thanks,
Ted
The problem is not the source or the function being called cause if you read what i said again, it is triggering something in the right web service, it's just not triggering the right function... and to fix the error 500 i had earlier i have to create a parameter less web method which is completly useless in this case...

Extender controls of type AjaxControlToolkit.DragPanelExtender cannot extend controls of t

Hi, I'm getting this error when trying to port an old Atlas Web App to use the latest bits - any help would be nice as to what controls I CAN extend - so if I can't use a DIV what then?:

Server Error in '/GRintranets' Application.

Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

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.InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Source Error:

Line 368: {Line 369:// EnsureProfileScriptService(ScriptManager.GetCurrent(Page), true);Line 370: base.OnPreRender(e);Line 371:Line 372: if (Enabled && TargetControl.Visible)


Source File:E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs Line:370

Stack Trace:

[InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.] System.Web.UI.ScriptControlManager.VerifyTargetControlType(TExtenderControl extenderControl, Control targetControl) +262 System.Web.UI.ScriptControlManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +74 System.Web.UI.ScriptManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +104 System.Web.UI.ExtenderControl.RegisterWithScriptManager() +177 System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +17 AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:370 System.Web.UI.Control.PreRenderRecursiveInternal() +77 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



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

just use an <asp:Panel> control


Thanx Shawn - it works fine now but it doesn't seem to respect the z-index: 999 I'm assigning it (I tried through 'Style' and 'cssClass') - the thing is the window disappears behind other controls.

Could you say something useful about how to go to not let the draggable asp:Panel disappear behind the other page controls? I have explicit a very high value for the z-index but it won't stay on top. TIA

FYI, the page is loaded through AJAX in an iframe inside a table (on a page that uses a MasterPage), like this:

<tr><tdcolspan="10"style="height: 710px; width: 100%; z-index: 999;"valign="top"><!--content-->

<iframerunat="server"frameborder="0"id="ifContent"style="z-index: 999; width: 100%; height: 100%;"/>

<!--content--></td></tr>

Then, the page contains among other controls this combination of controls where I load content from a document in the iframe and make dragging possible through the inner asp:Panel:

<asp:Panelrunat="server"ID="pnlPaginaHTML"CssClass="cssPnlPaginaHTML"Style="z-index: 999">

<asp:PanelID="pnlLeer"runat="server"BackColor="Gray"Style="left: 12px; position: absolute; top: 5px; width: 828px; height: 16px"><spanstyle="font-size: 8pt"> se puede mover la ventana con el mouse rastreando la ventana en esta barra gris</span></asp:Panel><iframerunat="server"id="ifrPaginaHTML"src="#"scrolling="auto"style=" z-index: 999; left: 11px; width: 829px; position: absolute; top: 26px; height: 612px;"frameborder="1"></iframe></asp:Panel><atlas:DragPanelExtenderID="DragPanelExtender1"runat="server"TargetControlID="pnlPaginaHTML"DragHandleID="pnlLeer"></atlas:DragPanelExtender>

Monday, March 26, 2012

Expression Web

Is there a way to get Expression Web to recognize the Ajax Toolkit Controls? I downloaded the toolkit but I do not know how to get the Ajax controls to show up in the Toolbox.

Hi Dlcahall,

If you are failed to add Ajax Control Toolkit to the Toolbox directly, you should add it like add a customer control.

Here is the steps.

1. Firstly you need to GAC the assembly

2. Next add a <%@.Register%> page directive to your page with the assemblies fully qualified name. If you don't add the page directive with a fully qualified name, then you lose design-time view of the control and intellisense.An alternative, and probably better, step is to add a web.config file to your project. Again you need a fully qualified name here.

For more details , please visithere.

Hope this helps.

Best regards,

Jonathan


I had already tried that and it did not work. I got an error, something about not having a unique ID or something. I do not remember. Also am noticing that Expression Web does not allow you to do code behind. Expression Web is a fine tool for straight forward stuff but it is doing to need another round before it becomes a full fledged .NET development tool. Maybe MS is not going to do that.


Hi Dlcahall,

I think in your situation,VS or Visual Studio Express is a better choice.

I hope this help.

Best regards,

Jonathan

Exposing Web Services from an ASPX page does not work

Hi All,

I am working with ATLAS technology. i am trying to imitatehttp://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#webpage
"Exposing Web Services from an ASPX page"

i am having an aspx page which is inherited from our own Page class not from System.Web.UI.Page.

public partial class MainSearchPage : some namespace.MyPage

but this example does not work in this context.because in javascript, function OnWebRequestComplete1(result) returns null as result.

please help me in this issue.

thanks
Jaideep

hello.

well, i think that it should work. here's an example:

pypage.cs
namespace Test
{
public class MyPage:Page
{
[WebMethod]
public string HelloWorld(string s)
{
return "Hello '" + s + "'";
}
}
}

now, the aspx page:


Untitled Page

function handle()
{
PageMethods.HelloWorld( "Luis", handleComplete );
}

function handleComplete( res )
{
alert( res );
}

here everything is working properly...

Yes, this should work. To debug your issue, I would try:

Check on the server whether your method gets called at all.

yes, my server side code in code behind of aspx is not getting called.
in javascript side:

function handle()

{

PageMethods.HelloWorld("jaideep", handleComplete );

}

function handleComplete( res )

{

debug.dump(res,"Result",true);

alert( res );

}

in debugger, result is null.also my aspx is having one user control also.i tried to put debug in my code behind.but function HelloWorld is not getting called.

any clue as to what is happening.
thanks

jaideep


after viewing request/response in Fiddler ,i got a message indicating a corrupted viewstate.
same is the problem in following post:
http://forums.asp.net/1205269/ShowPost.aspx "ViewState and Atlas ".
and as per the instruction given , i removed "type =="hidden" condition from file
Atlas.js on line 3495.and now it is working!! but this approach is correct or not?
please let me know about this.
Thanks

JAideep


Copying my reply from the other thread:

I tried a few things, but was not able to repro. Could you give this a try with the March CTP to see if it still happens?

thanks,
David

Exposing Web Services from a custom control

In one of quickstart tutorials there is a way to use a WebMethod straight in the aspx.page(http://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#webpage)

<%@dotnet.itags.org. Import Namespace="System.Web.Services" %
...

<script type="text/C#" runat="server">
[WebMethod]
public string HelloWorld(string s)
{
return "Hello '" + s + "'";
}
</script>

This example calls

PageMethods.HelloWorld(document.getElementById("nameTextBox").value, OnWebRequestComplete1);
on the client side

I am developing custom controls and am wondering if I can call a WebMethod from within my custom control.

I would imagine I have to register the namespace and class of my custom control but I don't know how. It obviously works on the aspx page because of the built-in PageMethods function

IMHO, you can't do this in the current version of Atlas because the Atlas Server Library doesn't provide this future. It will be necessary to look through control tree searching special methods... And Atlas must have an ability to know, which instance of webcontrol was called by client script. It's very difficult, as I think.

Exposing Web Services defined in class libraries

I have a class library (or will have) that defines a bunch of web services. I can reference Atlas if necessary. How do I expose all these web services to Atlas via IIS/ASP.Net. In other words, I do *not* want the code for my web services to be in the web project, I want them to be in an external project and optimally just included with a single line for all services, or a line per service if necessary.

Thanks.

All you need to do is to add your assembly as a reference to the web project and then add it to the ScriptManager service reference as following:

 <atlas:ScriptManager ID="ScriptManager1" runat="server" > <Services> <atlas:ServiceReference Type="namepsace.typename" /> </Services></atlas:ScriptManager>

Replace the bold text with the type name of your web service.


Seems that this has changed since way back when... How do I reference a service in a class library now? How do I then hook it up to an extender, e.g. an AutoCompleteExtender?

Thanks.

Exposing web service that returns DataSet

Hi,

Is there anyway to call web service(asmx) method that returns DataSet from client javascript that uses

AJAX <ScriptManager> (that generates auto js proxy) , I know that custom classes works as a return value, what about DataSets?

If Yes I can I process those DataSets , in client callback functions?

TNX

Leeor

leeorc

dont know if you can do this and whether it is an issue for you but if you do move to datasets then you will be restricting your web service to .net consumers only


http://weblogs.asp.net/infinitiesloop/archive/2006/12/14/ajax-futures-december-ctp-returning-datasets-datatables-and-datarows-from-a-webservice-or-pagemethod.aspx

Exposing desktop applications to the web through AJAX

Hi,

I would like to present a very impressive application that provides access to a desktop only application through the web. This is a power full demonstration of the capabilities of Visual WebGui which is an open source framework that provides WinForms like development for developing web application.

Here is a link to a web cast showing this application:

http://www.networkd.com/demos/inferno/ 

Hope you find this intriguing enough to find our more about Visual WebGui (http://www.visualwebgui.com). If you do I would be happy to give you guys more information.

Cheers,
Guy

Hi,

As far as I know, AJAX isn't design to do that.

I have searched a lot for your, and found you post this topic to several forums.

I agree withW3bbo's reply athttp://channel9.msdn.com/ShowPost.aspx?PostID=359753

?The web isn't winforms though, and I believe it's a fallacy to try to mimic local apps within a browser. Remember, the author has very little control over the client and webapps are much easier to break, abuse HTTP, place tight requirements on the client end (often requiring client script (or worse) to be enabled), and have a disproportionately long development time.

Not forgetting the WYSIWYG paradigm they're based on, when the web is inherently WYSIWYM.

Never mind how not a single GUI framework for the web has full compliance with the specifications.

How is this project justified?

If you have further question,let me know.

Best Regards,

Explorer Error: Sys is not defined

Hi,

I'm trying to create a profile to mantain the position of one panel. When this user open the web page this panel should be in the same position as before. I read the Atlas reference and copied the code of the examples, but the explorer returns me this error:

'Sys' is not defined.

Here is the code of my web.config file:

<microsoft.web>

<profileService enabled="true"

setProperties="PanelRelogTop;PanelRelogWidth"

getProperties="PanelRelogTop;PanelRelogWidth" />

</microsoft.web>

And here is the code I use:

<atlas:ProfileScriptService ID="pss1" runat="server"></atlas:ProfileScriptService>

<script type="text/javascript" language="JavaScript">

var PanelReloj = $("PanelReloj");

//This will load the profile data into the various HTML elements

//when the page loads.

function OnPageLoad() {

//Turn off automatic saving of the profile back to the server each time

//a profile property changes.

Sys.Profile.set_autoSave(false);

//Assign an event handler that runs once the profile has been loaded from the server

Sys.Profile.loaded.add(onProfileLoadComplete);

//Assign an event handler that runs once the profile has been successfully saved on the server

Sys.Profile.saved.add(onProfileSaveComplete);

//Load the profile from the server. As with all web service calls in "Atlas", the load

//occurs asynchronously.

Sys.Profile.load();

}

//Called when the profile data has been loaded from the server

function onProfileLoadComplete()

{

PanelReloj.top = Sys.Profile.properties.PanelRelogTop;

PanelReloj.width = Sys.Profile.properties.PanelRelogWidth;

}

function OnUpdateProfile()

{

Sys.Profile.properties.PanelRelogTop = PanelReloj.top;

Sys.Profile.properties.PanelRelogWidth = PanelReloj.width;

//Saves the profile on the server. The save occurs asynchronously.

Sys.Profile.save();

}

function onProfileSaveComplete() {

alert('The profile has been saved.');

}

</script>

Does anybody know if I'm doing something wrong or do I need to do something else?

Thanks!!!

When does OnPageLoad function gets called? Is it after Atlas has finished loading or when the window or body onload is fired? If it is the later case try removing the event handler and putting it in a javascript function called pageLoad (which gets fired when Atlas is loaded).

function pageLoad()
{
OnPageLoad();
}


It does on bdy onload event.

<body onload="OnPageLoad()">


Hi!

Instead of making your initial function call in <body onload=''> you should use the following snippet in the document:

 <script type="text/javascript"> function OnApplicationLoad() { MyFunc(); return false; } </script>

This is because the Ajax framework takes some time to initialize and your call is being made before the Sys object is created. The "OnApplicationLoad" is raised from Ajax when initialization is done.

--
Mattias Lindsj? | Fivestarday Sweden | www.fivestarday.se |


I think I solve the problem, I have to use Web object instead of Sys object. It's something I discover looking at the Atlas scripts or the object Browser on the Atlas reference.

Now, I do profile on web controls but only while the user is in the page. If the explorer is closed and then the user loads the same web page, there isn't values for the profile. I suppose after reading the documentation that these values are saved in some way and returned when the page is loaded again. How I do this using client code? And, what is the funcionality of the ProfileScriptService control?


hello.

if you're still using the Web namespace (instead of the Sys), then that means that you're running an old version of ATLAS (the March CTP is the latest release).

I've updated the new Atlas version and works fine with Sys object. Thanks for this point Luis.

Mattias, thanks for this code. It works with your suggestion and on the Load event of the body with the new version of Atlas.

Someone of you know how I can keep the profile for maintain configuration of pages?


I suggest starting a new thread with a descriptive title to focus on this. It's general best to limit one thread to a single issue, so that others can simply look at the title and know what it's about.

thanks,
David

Saturday, March 24, 2012

Exclude languages from assembly?

Is it possible to exclude all of the different languages from the assembly? I build web applications that are only used locally, so have no need for all of the different languages, and every time I expand my Bin folder in VS I have to scroll down past all of the folders to see what dlls I've got. Would be nice to have some configuration setting to disable the additional language resources if not needed...?

Thanks,

eddie

i just set up another development machine today and noticed the same problem, but its never happened on other machines


Hi Eddie,

If you want to disable such feature, you may exclude the lines like the following one from the AjaxControlToolkit.csproj file.

<EmbeddedResourceInclude="ScriptResources\ScriptResources.ar.resx"Condition=" '$(Configuration)'=='Release' ">

<SubType>Designer</SubType>

</EmbeddedResource>

You may need to use notepad to edit it.


Hi Raymond,

Thanks for your reply, and sorry it took me so long to reply. I just tried this out - I downloaded the current source for the toolkit, edited the AjaxControlToolkit.csproj file, removing all references to those ScriptResources.[culture].resx and then did a build. I took the resulting dll and replaced the current dll in VS (replaced the reference), but when I did a build it put back all of those folders... Am I missing something?

Thanks again,

eddie


Eddie,

Here is the .csproj file of mine:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B3B89160-3224-476E-9076-70B500C816CF}</ProjectGuid>
<OutputType>Library</OutputType>
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>AjaxControlToolkit</AssemblyName>
<RootNamespace>AjaxControlToolkit</RootNamespace>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>AjaxControlToolkit.snk</AssemblyOriginatorKeyFile>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AlwaysVisibleControl\AlwaysVisibleControlBehavior.js" />
<EmbeddedResource Include="CascadingDropDown\CascadingDropDownBehavior.js" />
<EmbeddedResource Include="CollapsiblePanel\CollapsiblePanelBehavior.js" />
<EmbeddedResource Include="Common\Common.js" />
<EmbeddedResource Include="ConfirmButton\confirmButtonBehavior.js" />
<EmbeddedResource Include="DropShadow\DropShadowBehavior.js" />
<EmbeddedResource Include="HoverMenu\HoverMenuBehavior.js" />
<EmbeddedResource Include="ModalPopup\ModalPopupBehavior.js" />
<EmbeddedResource Include="NumericUpDown\NumericUpDownBehavior.js" />
<EmbeddedResource Include="PopupControl\PopupControlBehavior.js" />
<EmbeddedResource Include="ReorderList\DropWatcherBehavior.js" />
<EmbeddedResource Include="ResizableControl\ResizableControlBehavior.js" />
<EmbeddedResource Include="RoundedCorners\RoundedCornersBehavior.js" />
<EmbeddedResource Include="TextboxWatermark\TextboxWatermark.js" />
<EmbeddedResource Include="ToggleButton\ToggleButton.js" />
</ItemGroup>
<ItemGroup>
<Compile Include="Accordion\AccordionCommandEventArgs.cs" />
<Compile Include="Accordion\AccordionItemEvent.cs" />
<Compile Include="Accordion\AccordionItemType.cs" />
<Compile Include="Accordion\Accordion.cs" />
<Compile Include="Accordion\AccordionContentPanel.cs" />
<Compile Include="Accordion\AccordionDesigner.cs" />
<Compile Include="Accordion\AccordionExtender.cs" />
<Compile Include="Accordion\AccordionExtenderDesigner.cs" />
<Compile Include="Accordion\AccordionPane.cs" />
<Compile Include="Accordion\AccordionPaneCollection.cs" />
<Compile Include="Accordion\AutoSize.cs" />
<Compile Include="AlwaysVisibleControl\AlwaysVisibleControlDesigner.cs" />
<Compile Include="AlwaysVisibleControl\AlwaysVisibleControlExtender.cs" />
<Compile Include="AlwaysVisibleControl\HorizontalSide.cs" />
<Compile Include="AlwaysVisibleControl\VerticalSide.cs" />
<Compile Include="Animation\Animation.cs" />
<Compile Include="Animation\AnimationExtender.cs" />
<Compile Include="Animation\AnimationExtenderDesigner.cs" />
<Compile Include="Animation\AnimationJavaScriptConverter.cs" />
<Compile Include="Animation\AnimationScripts.cs" />
<Compile Include="AutoComplete\AutoCompleteDesigner.cs" />
<Compile Include="AutoComplete\AutoCompleteExtender.cs" />
<Compile Include="Calendar\CalendarDesigner.cs" />
<Compile Include="Calendar\CalendarExtender.cs" />
<Compile Include="CascadingDropDown\CascadingDropDownDesigner.cs" />
<Compile Include="CascadingDropDown\CascadingDropDownExtender.cs" />
<Compile Include="CascadingDropDown\CascadingDropDownNameValue.cs" />
<Compile Include="CollapsiblePanel\CollapsiblePanelDesigner.cs" />
<Compile Include="CollapsiblePanel\CollapsiblePanelExpandDirection.cs" />
<Compile Include="CollapsiblePanel\CollapsiblePanelExtender.cs" />
<Compile Include="Common\BoxSide.cs" />
<Compile Include="Common\DateTimeScripts.cs" />
<Compile Include="Common\ThreadingScripts.cs" />
<Compile Include="Common\CommonToolkitScripts.cs" />
<Compile Include="Compat\DragDrop\DragDropScripts.cs" />
<Compile Include="Compat\Timer\TimerScript.cs" />
<Compile Include="ConfirmButton\confirmButtonDesigner.cs" />
<Compile Include="ConfirmButton\confirmButtonExtender.cs" />
<Compile Include="DragPanel\DragPanelDesigner.cs" />
<Compile Include="DragPanel\DragPanelExtender.cs" />
<Compile Include="DropDown\DropDownDesigner.cs" />
<Compile Include="DropDown\DropDownExtender.cs" />
<Compile Include="DropShadow\DropShadowDesigner.cs" />
<Compile Include="DropShadow\DropShadowExtender.cs" />
<Compile Include="DynamicPopulate\DynamicPopulateDesigner.cs" />
<Compile Include="DynamicPopulate\DynamicPopulateExtender.cs" />
<Compile Include="ExtenderBase\AnimationExtenderControlBase.cs" />
<Compile Include="ExtenderBase\ClientCssResourceAttribute.cs" />
<Compile Include="ExtenderBase\ClientPropertyNameAttribute.cs" />
<Compile Include="ExtenderBase\ClientScriptResourceAttribute.cs" />
<Compile Include="ExtenderBase\ComponentReferenceAttribute.cs" />
<Compile Include="ExtenderBase\Constants.cs" />
<Compile Include="ExtenderBase\Design\ExtendedTypeDescriptionProvider.cs" />
<Compile Include="ExtenderBase\Design\ExtenderBaseDesignerHelpers.cs" />
<Compile Include="ExtenderBase\Design\ExtenderControlBaseDesigner.cs" />
<Compile Include="ExtenderBase\Design\ExtenderControlBaseDesigner.PageMethodSignatures.cs" />
<Compile Include="ExtenderBase\Design\ExternalReferences.cs" />
<Compile Include="ExtenderBase\Design\PageMethodSignatureAttribute.cs" />
<Compile Include="ExtenderBase\Design\TypeControlIDConverter.cs" />
<Compile Include="ExtenderBase\DynamicPopulateExtenderControlBase.cs" />
<Compile Include="ExtenderBase\ElementReferenceAttribute.cs" />
<Compile Include="ExtenderBase\ExtenderControlBase.cs" />
<Compile Include="ExtenderBase\ExtenderControlEventAttribute.cs" />
<Compile Include="ExtenderBase\ExtenderControlMethodAttribute.cs" />
<Compile Include="ExtenderBase\ExtenderControlPropertyAttribute.cs" />
<Compile Include="ExtenderBase\IClientStateManager.cs" />
<Compile Include="ExtenderBase\IControlResolver.cs" />
<Compile Include="ExtenderBase\ProfilePropertyBinding.cs" />
<Compile Include="ExtenderBase\ProfilePropertyBindingCollection.cs" />
<Compile Include="ExtenderBase\RequiredPropertyAttribute.cs" />
<Compile Include="ExtenderBase\RequiredScriptAttribute.cs" />
<Compile Include="ExtenderBase\ResolveControlEventArgs.cs" />
<Compile Include="ExtenderBase\ResolveControlEventHandler.cs" />
<Compile Include="ExtenderBase\ScriptControlBase.cs" />
<Compile Include="ExtenderBase\ScriptObjectBuilder.cs" />
<Compile Include="ExtenderBase\ScriptUserControl.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ExtenderBase\ServicePathConverter.cs" />
<Compile Include="FilteredTextBox\FilteredTextBoxDesigner.cs" />
<Compile Include="FilteredTextBox\FilteredTextBoxExtender.cs" />
<Compile Include="FilteredTextBox\FilterModes.cs" />
<Compile Include="FilteredTextBox\FilterTypes.cs" />
<Compile Include="HoverExtender\HoverExtenderDesigner.cs" />
<Compile Include="HoverExtender\HoverExtender.cs" />
<Compile Include="HoverMenu\HoverMenuDesigner.cs" />
<Compile Include="HoverMenu\HoverMenuExtender.cs" />
<Compile Include="HoverMenu\HoverMenuPopupPosition.cs" />
<Compile Include="ListSearch\ListSearchDesigner.cs" />
<Compile Include="ListSearch\ListSearchExtender.cs" />
<Compile Include="ListSearch\ListSearchPromptPosition.cs" />
<Compile Include="MaskedEdit\Compatibility\BaseValidator.cs" />
<Compile Include="MaskedEdit\Compatibility\IBaseCompareValidatorAccessor.cs" />
<Compile Include="MaskedEdit\Compatibility\IBaseValidatorAccessor.cs" />
<Compile Include="MaskedEdit\Compatibility\IWebControlAccessor.cs" />
<Compile Include="MaskedEdit\Compatibility\ValidatorHelper.cs" />
<Compile Include="MaskedEdit\MaskedEditCommon.cs" />
<Compile Include="MaskedEdit\MaskedEditDesigner.cs" />
<Compile Include="MaskedEdit\MaskedEditEnum.cs" />
<Compile Include="MaskedEdit\MaskedEditExtender.cs" />
<Compile Include="MaskedEdit\MaskedEditTypeConvert.cs" />
<Compile Include="MaskedEdit\MaskedEditValidator.cs" />
<Compile Include="ModalPopup\ModalPopupExtender.cs" />
<Compile Include="ModalPopup\ModalPopupDesigner.cs" />
<Compile Include="MutuallyExclusiveCheckBox\MutuallyExclusiveCheckBoxDesigner.cs" />
<Compile Include="MutuallyExclusiveCheckBox\MutuallyExclusiveCheckBoxExtender.cs" />
<Compile Include="NoBot\NoBot.cs" />
<Compile Include="NoBot\NoBotDesigner.cs" />
<Compile Include="NoBot\NoBotEventArgs.cs" />
<Compile Include="NoBot\NoBotExtender.cs" />
<Compile Include="NoBot\NoBotState.cs" />
<Compile Include="NumericUpDown\NumericUpDownDesigner.cs" />
<Compile Include="NumericUpDown\NumericUpDownExtender.cs" />
<Compile Include="PagingBulletedList\PagingBulletedListDesigner.cs" />
<Compile Include="PagingBulletedList\PagingBulletedListExtender.cs" />
<Compile Include="PasswordStrength\PasswordStrengthExtenderDesigner.cs" />
<Compile Include="PasswordStrength\PasswordStrengthExtenderExtender.cs" />
<Compile Include="PasswordStrength\PropertyEnumerations.cs" />
<Compile Include="PopupControl\PopupControlDesigner.cs" />
<Compile Include="PopupControl\PopupControlExtender.cs" />
<Compile Include="PopupExtender\PopupExtender.cs" />
<Compile Include="PopupExtender\PopupExtenderDesigner.cs" />
<Compile Include="PopupExtender\PositioningMode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Rating\Rating.cs" />
<Compile Include="Rating\RatingDesigner.cs" />
<Compile Include="Rating\RatingExtender.cs" />
<Compile Include="ReorderList\BulletedList.cs" />
<Compile Include="ReorderList\BulletedListItem.cs" />
<Compile Include="ReorderList\DraggableListItemExtender.cs" />
<Compile Include="ReorderList\DropWatcherExtender.cs" />
<Compile Include="ReorderList\ReorderHandleAlignment.cs" />
<Compile Include="ReorderList\ReorderList.cs" />
<Compile Include="ReorderList\ReorderListDesigner.cs" />
<Compile Include="ReorderList\ReorderListEvents.cs" />
<Compile Include="ReorderList\ReorderListInsertLocation.cs" />
<Compile Include="ReorderList\ReorderListItem.cs" />
<Compile Include="ReorderList\ReorderListItemCollection.cs" />
<Compile Include="ReorderList\ReorderListItemLayoutType.cs" />
<Compile Include="ReorderList\RepeatDirection.cs" />
<Compile Include="ResizableControl\ResizableControlDesigner.cs" />
<Compile Include="ResizableControl\ResizableControlExtender.cs" />
<Compile Include="RoundedCorners\BoxCorners.cs" />
<Compile Include="RoundedCorners\RoundedCornersDesigner.cs" />
<Compile Include="RoundedCorners\RoundedCornersExtender.cs" />
<Compile Include="Tabs\TabPanelDesigner.cs" />
<Compile Include="ToolkitScriptManager\ScriptCombineAttribute.cs" />
<Compile Include="Slider\SliderDesigner.cs" />
<Compile Include="Slider\SliderExtender.cs" />
<Compile Include="Slider\SliderOrientation.cs" />
<Compile Include="SlideShow\Slide.cs" />
<Compile Include="SlideShow\SlideShowDesigner.cs" />
<Compile Include="SlideShow\SlideShowExtender.cs" />
<Compile Include="Tabs\TabContainer.cs" />
<Compile Include="Tabs\TabContainerDesigner.cs" />
<Compile Include="Tabs\TabPanel.cs" />
<Compile Include="Tabs\TabPanelCollection.cs" />
<Compile Include="TextboxWatermark\TextboxWatermarkExtender.cs" />
<Compile Include="TextboxWatermark\TextboxWatermarkExtenderDesigner.cs" />
<Compile Include="ToggleButton\ToggleButtonExtender.cs" />
<Compile Include="ToggleButton\ToggleButtonExtenderDesigner.cs" />
<Compile Include="ToolkitScriptManager\ToolkitScriptManager.cs" />
<Compile Include="UpdatePanelAnimation\UpdatePanelAnimationDesigner.cs" />
<Compile Include="UpdatePanelAnimation\UpdatePanelAnimationExtender.cs" />
<Compile Include="ValidatorCallout\ValidatorCalloutDesigner.cs" />
<Compile Include="ValidatorCallout\ValidatorCalloutExtender.cs" />
</ItemGroup>
<ItemGroup>
<None Include="AjaxControlToolkit.snk" />
<None Include="app.config" />
<None Include="ExtenderBase\Design\ExternalReferences.t4" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Accordion\AccordionBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ReorderList\DraggableListItemBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="PasswordStrength\PasswordStrengthExtenderBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FilteredTextBox\FilteredTextBoxBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Rating\RatingBehavior.js" />
<EmbeddedResource Include="PagingBulletedList\PagingBulletedListBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DynamicPopulate\DynamicPopulateBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ExtenderBase\BaseScripts.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Animation\AnimationBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Animation\Animations.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="UpdatePanelAnimation\UpdatePanelAnimationBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="NoBot\NoBotBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Slider\SliderBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Slider\Images\slider_h_handle.gif" />
<EmbeddedResource Include="Slider\Images\slider_h_rail.gif" />
<EmbeddedResource Include="Slider\Images\slider_v_handle.gif" />
<EmbeddedResource Include="Slider\Images\slider_v_rail.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MutuallyExclusiveCheckBox\MutuallyExclusiveCheckBoxBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DropDown\drop-arrow.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DropDown\DropDownBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ValidatorCallout\alert-large.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ValidatorCallout\ValidatorCalloutBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ValidatorCallout\alert-small.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ValidatorCallout\close.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="HoverExtender\HoverBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="PopupExtender\PopupBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DragPanel\FloatingBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Compat\DragDrop\DragDropScripts.js" />
</ItemGroup>
<ItemGroup>
<Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Compat\Timer\Timer.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Common\DateTime.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Calendar\CalendarBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Calendar\arrow-right.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Calendar\arrow-left.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\Tabs.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-right.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-line.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-left.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-hover.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-hover-right.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-hover-left.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-active.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-active-right.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\tab-active-left.gif" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MaskedEdit\MaskedEditBehavior.js" />
<EmbeddedResource Include="MaskedEdit\MaskedEditValidator.js" />
<EmbeddedResource Include="Properties\Resources.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<CustomToolNamespace>AjaxControlToolkit</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Tabs\Tabs.css" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Calendar\Calendar.css" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Slider\Slider.css" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DropDown\DropDown.css" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AutoComplete\AutoCompleteBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Common\Threading.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="SlideShow\SlideShowBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ListSearch\ListSearchBehavior.js" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Accordion\Accordion.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AlwaysVisibleControl\AlwaysVisible.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Animation\Animation.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AutoComplete\AutoComplete.ico" />
<EmbeddedResource Include="Calendar\Calendar.ico" />
<EmbeddedResource Include="CascadingDropDown\CascadingDropDown.ico" />
<EmbeddedResource Include="CollapsiblePanel\CollapsiblePanel.ico" />
<EmbeddedResource Include="ConfirmButton\ConfirmButton.ico" />
<EmbeddedResource Include="DragPanel\DragPanel.ico" />
<EmbeddedResource Include="DropDown\DropDown.ico" />
<EmbeddedResource Include="DropShadow\DropShadow.ico" />
<EmbeddedResource Include="DynamicPopulate\DynamicPopulate.ico" />
<EmbeddedResource Include="FilteredTextBox\FilteredTextBox.ico" />
<EmbeddedResource Include="HoverMenu\HoverMenu.ico" />
<EmbeddedResource Include="ListSearch\ListSearch.ico" />
<EmbeddedResource Include="MaskedEdit\MaskedEdit.ico" />
<EmbeddedResource Include="ModalPopup\ModalPopup.ico" />
<EmbeddedResource Include="MutuallyExclusiveCheckBox\MutuallyExclusiveCheckBox.ico" />
<EmbeddedResource Include="NoBot\NoBot.ico" />
<EmbeddedResource Include="NumericUpDown\NumericUpDown.ico" />
<EmbeddedResource Include="PagingBulletedList\PagingBulletedList.ico" />
<EmbeddedResource Include="PasswordStrength\PasswordStrength.ico" />
<EmbeddedResource Include="PopupControl\PopupControl.ico" />
<EmbeddedResource Include="Rating\Rating.ico" />
<EmbeddedResource Include="ReorderList\ReorderList.ico" />
<EmbeddedResource Include="ResizableControl\ResizableControl.ico" />
<EmbeddedResource Include="RoundedCorners\RoundedCorners.ico" />
<EmbeddedResource Include="ScriptResources\ScriptResources.resx">
<SubType>Designer</SubType>
</EmbeddedResource>

<EmbeddedResource Include="Slider\Slider.ico" />
<EmbeddedResource Include="SlideShow\SlideShow.ico" />
<EmbeddedResource Include="Tabs\Tabs.ico" />
<EmbeddedResource Include="TextboxWatermark\TextboxWatermark.ico" />
<EmbeddedResource Include="ToggleButton\ToggleButton.ico" />
<EmbeddedResource Include="UpdatePanelAnimation\UpdatePanelAnimation.ico" />
<EmbeddedResource Include="ValidatorCallout\ValidatorCallout.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<ProjectExtensions>
<VisualStudio AllowExistingFolder="true" />
</ProjectExtensions>
<!-- Strip the comments out of any JavaScript files that were embedded as resources -->
<UsingTask TaskName="AjaxControlToolkit.JavaScriptCommentStripperTask" AssemblyFile="$(MSBuildProjectDirectory)\..\Binaries\JavaScriptCommentStripper.dll" />
<PropertyGroup>
<CompileDependsOn>
StripJavaScriptComments;
$(CompileDependsOn)
</CompileDependsOn>
</PropertyGroup>
<Target Name="StripJavaScriptComments" Condition=" '$(ConfigurationName)'=='Release' ">
<CreateItem Include="@.(ManifestNonResxWithNoCultureOnDisk)" Condition="'%(Extension)'=='.js'">
<Output TaskParameter="Include" ItemName="EmbeddedJavaScriptSourceFiles" />
</CreateItem>
<JavaScriptCommentStripperTask SourceFiles="@.(EmbeddedJavaScriptSourceFiles)" DestinationFiles="@.(EmbeddedJavaScriptSourceFiles)" />
</Target>
</Project>

It works perfectly as you required.


Thanks, I tried it again and it worked. Must have missed something before. Your project file didn't work for me - got all kinds of errors, but I went back and re-edited the original project file and did a new build and that worked.

Thanks again!

eddie

Exception when using public attributes of user control containing UpdatePanel

I have a page that utilizes a user control. This control is compiled in using a web deployment project. The project is not set to allow the precompiled site to be updatable.

This user control has a number of attributes that set/access child control properties.

My problem is that within my user control, no child control within the UpdatePanel is instantiated when the page attributes are being processed. When I try to declare attributes for my user control within the .aspx, I get a null reference exception. The generated code that sets these attributes appears to run too early. If I set the attributes programmatically at Page_Init or Page_Load, everything works okay.

On error, the flow of execution is this:

1) Page's Page_Init

2) Exception (attempt to set attribute of null control)

(Not called: Control's Page_PreInit, Control's Page_Init)

I have tried calling EnsureChildControls() for both the page and the user control, but it does not make any difference.

It looks something like this:

ASPX file:

<asp:Content ID="thePage" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server"> <MyControls:theControl id="WebLinksControl" runat="server" CssClass="Content_FullPage" ListTitleText="my text" /></asp:Content>
ASCX file:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional" > <ContentTemplate> <div class="ListTitle"> <asp:Label ID="lblListTitle" runat="server" Text="Replace Me"> </asp:Label> </div></ContentTemplate></asp:UpdatePanel>

The accessor:

/// <summary> /// Get/set the text of the label: List title /// </summary>public string ListTitleText {get {// Retrieve object propertyreturn lblListTitle.Text; }set {// Override null with empty stringif (value ==null)value = String.Empty;// Set object property lblListTitle.Text =value; } }

I'm currently experiencing this problem myself. Has anyone been able to solve this?

Me too. Has anyone been able to resolve this?

Edmund


Hi, I'm having the same issue. Anyone found a solution yet?

As you mentioned, I can get around it by setting the attributes programmatically but this isn't really desirable


Try this solution it worked for me:

Create a private variable to temporarily store the value of the property. Override the render method of the user control to assign the property to the textbox.

Private _maxLengthAsInteger

PublicProperty MaxLength()AsInteger
Get
Return txtValue.MaxLength
EndGet
Set(ByVal valueAsInteger)
_maxLength = value
End Set
EndPropertyOverridesSub Render(ByVal writerAs System.Web.UI.HtmlTextWriter)
txtValue.MaxLength = _maxLength
MyBase.Render(writer)
EndSub

Good luck, Hanan Schwartzberg
--------
Custom programming and web design
http://www.lionsden.co.il

Has a solution been found to this problem?

As for the temporary variable in the property suggestion, wouldn't that have a problem for any property accessed before the render occurred ie the set value is in the temp but the get is pointing to the actual child control. Seems like this causes an out of sync issue with the property values until the render method occurs.

Is there any way to ensure that the child controls exist before a property tries to get set without having to change a usercontrol into a custom control?


I believe you are correct about the problem with loading the temporary values into the controls being in the render method. The solution is, in my example, to move

txtValue.MaxLength = _maxLength

into the Page.Load method.

Hanan

Exception has been thrown by the target of an invocation.

I have an Atlas enabled asp page working fine in Visual Web Developer 2005.

It has a Web Service with two methods one for an autocomplete and another to generate a datatable to populate a datagrid.

The second method makes calls two methods from a DataSet object.(one gets a row and the other its details.)

When I deploy to produccion the autocomplete works fine but populating the datagrid fails with:

Exception has been thrown by the target of an invocation

thrown by InternetExplorer.

I tested the Web Service calling its operations directly and it works fine.

Please help.

ps. the production machine has low space in C:\ drive.

In both cases I go against the same SQL Server 2000 database.

Since I posted the question above I was able to "deploy" to a Virtual Directory (called "LocalAtlas" situated on D:\VB Projects\VB Web Developer\Atlas Web Virtual Dir\ ) of my Local IIS and after I added the impersonation tag

<

identityimpersonate="true"userName="vvvvvvvv"password="pppppppp"/>

the page worked as expected. However, it is looking for the .asmx file in the same directory where Visual Studio looks.

But changing the KEY tag from

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost:1459/AtlasWebSite1/OBWebService.asmx"/>

as created by Visual Web Dev to

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost/LocalAtlas/OBWebService.asmx"/>

or anything else I can think of (in Web.config) does not work.

(I removed the fileAtlasWebSite1/OBWebService.asmxto avoid using it)

Exception Handling?

It looks like there's no handling for server side errors at this point at least for the Web Service behavior. If I do the following:

[WebMethod]

publicbusCustomer GetCustomer()

{

thrownewSoapException("Failure dude!",SoapException.ServerFaultCode);

returnnewbusCustomer();

}
The call simply doesn't complete to any of the callbacks. Is there anyway to get any error info out of this? It seems to me that the result values should either include some sort of complex object that contain a reference to an error object or else provide some sort of other mechanism that notifies you of an error. Instead of a Timeout method, maybe there should be a more general Error method with an error object you can query for what type of error occurred on the server.

Hello

Try this on the client side javascript:

function displayTimeout(result)

{

alert('timeout:\n' + result);

}

function dispalyError(result)

{

alert('error:\n' + result);

}

function callMyWebservice()

{

GetCustomer(CallbackMethod,displayTimeout,displayError);

}

You can also use Fiddler to view the data returned from the Webservice. (www.fiddlertool.com)


Hi,

following the suggestion given by donaldduck1312, you have to declare an error callback for the asynchronous request. When the callback is invoked, you receive a Web.Net.MethodRequestError instance as the first parameter; this object has methods that allow to display infos about the error:

function onError(e) {
alert('Server Error: ' +
e.get_exceptionType() + '\r\n' +
'Message: ' +
e.get_message() + '\r\n' +
'Stack Trace: ' +
e.get_stackTrace());
}

Exception Handling

I haven't found any documentation on how to handle exceptions. Right now, I am throwing a System.Exception in the web service on purpose. I don't seem to be getting a result in javascript. Are there any examples for handling exceptions?
Wally

Exception handling is also very important for me. - Definitively missing. Glad to see a timeout feature !


Yes, it's one of the things that are missing right now. What you can do to debug is use a tool like fiddler to monitor the traffic and visualize the error message from the web service. Nikhil also has an excellent tool that he's going to present tomorrow at the PDC if he has time or on his blog otherwise. Stay tuned...
In which session will the tool be shown?
CIAO
Michael

It's not only while developing and debugging where you need exceptions. Many regular situations can be handled more effeciently using them.

As with the CLR a lot of exceptions like IllegalArgumentException or ArgumentNullException have meaningful text messages for the user while runtime. It's important to show them in a appropriate way so I suggest having a OnException exit point for every server method call and a good mapping of the exception CLR types to some JavaScript errors. I haven't found a good solution for this yet.


I think we need something similar like the .error property I have added in Ajax.NET Professional. Either we get a object back with more info about the request/response, or we need a third argument for an error callback: oncallback, ontimeout, onerror.
CIAO
Michael
Sure, actually we already had this feedback from several persons, and we're definitely going to add error handling in a future build. For the moment, you can use a fiddler-like tool. Nikhil's presentation is tomorrow at 5:00PM.
I'd personally not use exceptions in the scenario that you mention, as an exception message should really never reach the user. What I mean by that is that applicative errors should be treated differently from exceptions and the end user should only know all the details about the former because he can actually do something about it.
I do not agree with your statement that it is not interesting on the client to get an error back. I think there are two different errors:
- one, that will occur on the .NET code and returns a System.Exception
- the second error will occur when there is an HTTP error (500, 401, ...)
Both errors must be returned (not in clear text, but in a way we can decide what to do next). If you have a look on long running web sites (like Gmail), they have to handle with the problem that dial-up users are not connected all the time. In this scenario we need to get an error.
CIAO
Michael

bleroy wrote:

an exception message should really never reach the user...


I don't want to start a religious programming style war here. I've seen both opinions and the all where reasonable in their cases.
We will get "errors" on the client when in offline mode or disconnected. These states we have to handle with. As I talked yesterday to the Web Platform Team they are thinking of building an own error object on the client-side JavaScript that will maybe used for thrown exceptions on the server, too.
<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="http://pics.10026.com/?src=/Themes/default/images/icon-quote.gif"> <strong>mathertel wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4"><BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="http://pics.10026.com/?src=/Themes/default/images/icon-quote.gif"> <strong>bleroy wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">an exception message should really never reach the user...</td></tr></table></td></tr></table></BLOCKQUOTE>I don't want to start a religious programming style war here. I've seen both opinions and the all where reasonable in their cases.</td></tr></table></td></tr></table></BLOCKQUOTE>
Me neither. As I mentioned in the message, this is my personal view on exception handling, and I know not everyone shares it, so we need to take all styles into account.
<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="http://pics.10026.com/?src=/Themes/default/images/icon-quote.gif"> <strong>interactive wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">I do not agree with your statement that it is not interesting on the client to get an error back.</td></tr></table></td></tr></table></BLOCKQUOTE>
Never said that. I was talking about exceptions, not errors. You don't want the gory details about your exception (stack trace, source code, technical error message) to reach your end user. It's useless to him and it's a security risk. That's the reason for the customErrors setting in ASP.NET for example. Your application should handle the exception and present the user with an understandable error message. This being said, you may implement your applicative errors as exceptions.

everything was fine, when suddenly AJAX Stopped working

I was working on a small AJAX application on a windows 2003 server web application running on IIS 6.0

I putted an AJAX timer control on the web form

and on the Tick Event I wanted a label called Label1 to take the current time every second

code:

Label1.Text = Now.ToString()

It was working , but somehow I was changing in the IIS configuration when the application stops working

I tried the same application on another PC (windows xp + Visual Studio 2005), it worked fine in debugging mode

so I installed Visual Studio 2005 on the server to know what's the problem, and in debugging mode, the application starts normally, but the label does not change its text value

I uninstalled AJAX Extensions, reinstalled again, nothing changed

I tried : aspnet_regiis -i

nothing changed, please help, I tried a lot, I think there is something about security scripts on the server that is not allowing AJAX scripts to work.

thanks in advance.

Hi,

Please make sure the virtual directory isconfigured as a Application and using the asp.net 2.0.

1. Run inetmgr command

2. Expand and navigate to the virtual directory

3. Right click it and select properties

4. Click Create Button in Application Settings section

5. Active ASP.NET tab

6. Make sure asp.net version is correct

Hope this helps.

Wednesday, March 21, 2012

Event Management Project - General Questions

Hello,

I have been given the project of writing a web based Event Management Suite. I have a pretty good knowledge of ASP.NET and C# but would like to use AJAX for this project to elimate postbacks.

Goal:
- To create an interface that allows the user to visually define an actual venue.
- The user would define the size of the grid they need for the Event Location they want to define.
- The user would then be presented with a grid of the size they defined. The default type for each coordinate on the grid the user defined would be Floor.
- A graphic would be inserted into each coordinate on the grid to represent type Floor.
- The user would then be able to define two other types for each location in the grid.
- Seat
- Stage
- The graphic on the designated coordinate would change to reflect the defined type.
- The user would then be able to define the properties for the seats.
- Seat Name (ie A1, B2, C3)

This is only the first part of creating the Event Management Suite. But the Location must be defined before any of the other Event Properties can be defined.

Questions:
1. Is AJAX suited for this task.
2. If so what controls would you advise me to learn about and use.

I'm completely new to AJAX, so the more specific you are with answer and suggestions the better.

Thanks for helping me with this!!

You could accomplish this by utilizing the ASP.NETAjax Control Toolkit and Microsoft AJAX RC1. However, it would probably take a good amount of time to get the positioning of all of your elements/objects just right.

You should look at utlizing the ResizableControl and the DragPanel Control inside of the Ajax Control ToolKit. You might have to create your own control utlizing the DragOverlayExtender Class, and possibly the DragDropManager client side component.

However, even though these controls exist it would probably be easier and take less time if you have Flash experience to develop this kind of system. It provides better control for bounding boxes on dragging, duplicating movie clips and alot of other easy UI functionality. Plus you can then keep everything as far as the data behind the Event Layouts in XML for instance and pass the information to a Web Service that you create which in turn can store it in a database.

Just a few cents from my point of view. Definetely possibly in ASP.NET with ASP.NET Microsoft Ajax, it just will take you a bit of time to make sure the positioning and data behind it all works out.

Good luck,

JoeWeb

Errors with UpdatePanel & WebPart stuff after upgrade

I recently upgraded from Atlas CTP to Ajax beta 1. I beleive that I properly updated my web.config et. al.; however I keep getting this error regarding the UpdatePanel:

Element 'UpdatePanel' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'AsyncPostBackTrigger' is not a known element. This can occur if there is a compilation error in the Web site.
Validation (XHTML 1.0 Transitional): Element 'Triggers' is not supported.
Validation (XHTML 1.0 Transitional): Element 'ContentTemplate' is not supported.

I can drag the UpdatePanel from the IDE toolbox onto the page, but the Intellisense doesn't work and it causes errors.

On a related note, none of my WebParts stuff is recognized either:

Element 'WebPartManager' is not a known element. This can occur if there is a compilation error in the Web site.
'WebPartZone' is not a known element. This can occur if there is a compilation error in the Web site.

Anyone know what is causing this, and how I can fix?

TIA

hello.

hum...have you changed the web.config entries on the page section?


I've got the same problem. My web.confg page section looks like this:

<system.web><pages><controls>

<addtagPrefix="asp"namespace="Microsoft.Web.UI"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addtagPrefix="asp"namespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addnamespace="Microsoft.Web.Preview.UI"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

<addnamespace="Microsoft.Web.Preview.UI.Controls"assembly="Microsoft.Web.Preview"tagPrefix="atlas"/>

</controls>

I should be using <asp:UpdatePanel...> NOT<atlas:UpdatePanel...> correct? The only items showing up w/ intellisense are <atlas:AutoCompleteExtender>,<atlas:DragOverlayExtender>,<atlas:ProfileService>,<atlas:Script>,<atlas:TimerControl>, and<atlas:UpdateProgress>.

I'm also a bit lost with what I should have in my toolbox after the migration and adding in the value-add controls. Currently, I still have the ATLAS controls in my toolbox, same as I did from before the migration. Should I have removed these? I also removed the .dll's from my BIN directory before the migration (before the installs) and then added back both "AjaxControlToolkit.dll" and "Microsoft.Web.Preview.dll" after the BETA+ValueAdd+Toolkit installs.

Please help, I am LOST! Thanks!!

--c--


Change you asp tags to something else (Atlas" or "ajax" or whatever... will fix it - its a known bug...

Thanks Jody, that did it!!

Someone should consider updating the Migration Guide document. Step #3 specifically says to use "asp" for the tag. After I had already renamed all my <atlas> tags to <asp> I had to go back and put them back :( ...what a pain.

Thanks again!


Thanks Jodi. That helped me a lot. Just a note here. Change the tag prefix in web.config file pages section as well as in the html design file.

Shaun


I have the same error with the installation of AJAX 1.0, without any beta version installed , and the solution was the same, I changed the tags in the web config and in the html and the problem was solved.


Hi,
I don't know to wich categories this belongs butSmartNavigation="true" seems to cause also a "Sys.WebForms.PageRequestManagerParserErrorException" also.

Just some tip if you looking for hours just as I did ;)

Grtz


I've heard that you do not use SmartNavigation with AJAX (or even VS2005)

errors with the control toolkit

I just downloaded the ajax extensions, and toolkit, but everytime I add an item from the toolkit to my web form I get an error in the designer file.

It generates code in the designer.vb file like

but I get an error that says:

ProtectedWithEvents RoundedCornersExtender1As AjaxControlToolkit.RoundedCornersExtender

Type 'AjaxControlToolkit.RoundedCornersExtender' is not defined.

I also get an error from my web.config file that says:

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

pointing to the line:

<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"/>

does anyone have any idea what I'm doing wrong, or how I can fix this?

thanks,

smtraber

This post may help youhttp://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx (look down a little bit for the stuff on validators)

Errors in web.config when creating AJAX-type projects

Hi,

Whenever I create a AJAX website, or AJAX Control toolkit website, errors are found in my web.config, even before I've done anything

Warning 1 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 6 213 C:\...\AJAXEnabledWebSite1\
Warning 2 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 8 205 C:\...\AJAXEnabledWebSite1\
Warning 3 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 9 199 C:\...\AJAXEnabledWebSite1\
Warning 4 The 'requirePermission' attribute is not declared. C:\Documents and Settings\Louis\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\Web.config 10 213 C:\...\AJAXEnabledWebSite1\

Any ideas?

bump anyone?

EDIT: Also, I noticed intellisense seems to be broken, in the sense I only get "!--, ![CDATA[]], ?" when I type "<"


Ok, installing SP1 kinda solved it.