Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Wednesday, March 28, 2012

different version of AJAX

Dear All,

I and my friend are working on similar project.we installed the same VS 2005 version and SP1 and AJAX.my program has error.

it couldnt loadSystem.Web.Extensions does it cause by different version of AJAX?

or any other reason?

how can I fix this error?

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

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

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

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

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

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

</tagMapping>

Have you tried to re-install the AJAX library again?


of course I tried to re-install AJAX but nothing happenedConfused


Sorry that I asked, but sometimes those are the common errors. Also are you sure that you installed 1.0 instead of 3.5?


As I saw in the version tab it is 1.0.does it cause trouble to install version 3.5 instead of 1.0?(if my problem is solved in this case)


hello.

well, the validators are not on the system.web.extensions assembly. I think that they're on the validators dll:

http://forums.asp.net/t/1066821.aspx

btw, if you update your app to use the new version, i think that you no longer need to use those validators.

Monday, March 26, 2012

Developing Atlas Friendly Controls

I'm working a custom control that requires client-side javascript. Is there a list of best practices for making a control Atlas friendly?

I'm currently using the ClientScriptManager to register the necessary scripts, but something is not working properly.

hello.

though i still haven't developed none, i think that an atlas control is supposed to implement the IScriptControl interface (this interface introduces a method that is called when you need to register the xml-script emitted by the control).

since there still is no info about it, i think that your best option is to use reflector and see how they implemented the atlas server controls.


If you are developing a server-side control that wishes to perform client-side logic or behavior then you can certainly approach it from a number of angles:

Simply generate your own JavaScript and register with the clientscript on the Page. then tie up your client-side events to functions therein

Saturday, March 24, 2012

Deployment Issue of AjaxControlToolkit

Hi,

I have used the Ajax Control toolkit and on the Development machines it is working fine. but when I deployed it to the production server it stops working. The error it displays is that it is not able to get the embedded JavaScript files. This problem occurs on the pages which are using control like the Accordion and calender pop up.

I am not sure what is causing this because i have installed the latest asp.net Ajax on the server and copied the AjaxControlToolkit dll in the Bin also

Other embedded resources are working fine on type of resources like the images but they give errors when the resource type is JavaScript.

Do you have the proper setup (in web.config file) for the ScriptHandlerFactory handler and the scriptmodule?

Also, does any other ajax control work in your app? If Ajax is not GAC-ed you will probably need to set the app to full trust.


I have copied the Script Handler from the Ajax Toolkit.

Second. I have installed the Ajax and used the default settings.

There is another custom control which is working fine except that we have to put its resources through the Script tag of the ScriptManager. this is also does not load the scripts from the embedded assembly. but it works fine after we referenced the script through the Script Manager.

The same is working just fine on my development machine.

Deploying Atlas in IIS

Hi,

I've got a little problemwhen deploying my TreeView Atlas Example in IIS. I'm working on WinXP PRo SP2. Publishing the website from VS2005 is not a problem but when I want to view it in a browser i've got the following error:

XML analysis error : malformed Site: http://192.168.0.169/Test/FirstTreeView.aspxLine Number 1, Column 2: < % @dotnet.itags.org. Page Language="C # "% > - ^
Pls I need help

What is your sample doing? It looks like it's trying to parse the server aspx page itself as XML, which would not work. Does your web site run correctly before you deploy it?

David


Thanks for replying. My sample is a TreeView which DataSource is an XML File. I've got 2 update panels, on one, there is the update panel and the second show the selected nodes of the Treeview. It works fine before deploying it in IIS. I tried it on a friend's machine and the deployment works (Windows Server 2003, IIS 6.0). Do we then need to have IIS 6.0 in order to deploy coveniently atlas applications on IIS?

Here is my source code:

<%@. 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">
void dataBound(Object sender, TreeNodeEventArgs e)
{
// Determine the depth of a node as it is bound to data.
// If the depth is 1, show a check box.
if (e.Node.Depth == 2)
{
e.Node.ShowCheckBox = false;
}
else
{
e.Node.ShowCheckBox = false;
}
}

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//If a node is selected, display the text in the right table
//Message.Text = TreeView1.SelectedNode.Text;
if (TreeView1.SelectedNode.Selected)
{
foreach(TreeNode node in TreeView1.SelectedNode.ChildNodes)
{
Message.Text += node.Text + "<br>";
}
}
else
{
Message.Text = "No Item Selected";
}
}

protected void Button1_Click(object sender, EventArgs e)
{
Message.Text="";
}
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>First TreeView with an XML File</title>
<style type="text/css">
div.global
{
width:100%;
margin:0px;
border:1px solid #99ccff;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:#99ccff;
clear:left;
}
div.left
{
float:left;
width:200px;
margin:0;
padding:1em;
}
div.right
{
margin-left:270px;
border-left:1px solid #99ccff;
padding:1em;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager EnablePartialRendering=true ID=ScriptManager runat=server/>
<div class=global>
<div class="header">Dynamic Atlas Tree View</div>
<div class=left>
<atlas:UpdatePanel ID=up1 RenderMode=Inline Mode=Conditional runat=server>
<ContentTemplate>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XDS" OnTreeNodeDataBound="dataBound" ShowCheckBoxes=None OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" ShowLines=true>
<DataBindings>
<asp:TreeNodeBinding DataMember="Kpf" ValueField="ID" TextField="Name"/>
<asp:TreeNodeBinding DataMember="Activity" ValueField="Value" TextField="Value"/>
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="XDS" runat="server" DataFile="~/XMLTVDataSource.xml"></asp:XmlDataSource>
</ContentTemplate>
</atlas:UpdatePanel>
</div>
<div class=right>
<atlas:UpdatePanel ID=up2 runat=server Mode=Conditional RenderMode=Inline>
<ContentTemplate>
Selected elements<hr /><br />
<asp:Label ID=Message runat=server></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Clear All" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID=TreeView1 EventName=SelectedNodeChanged />
</Triggers>
</atlas:UpdatePanel>
</div>
<div class=footer>KPF Nord</div>
</div
</form>
</body>
</html>


I've fixed it. I re-installed IIS and .NET Framework 2.0. Latter i followed this:

All is OK Thanks

deploying Atlas enabled application

Hi,

I've installed the latest final release of atlas ( not the new beta one) It's working on my development server, but when I deploy it I get this error.

Do I need to install any applications on the live server? Shouldn't this be taken care of by just deploying the application ?

Thanks,

mike123

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 2: <configuration>Line 3: <configSections>Line 4: <sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">Line 5: <sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">Line 6: <sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">


Did you ever find a solution to this?

Copy those three DLL into your application's bin folder:

You can find them at C:\Program Files\MicrosoftASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025.
AJAXExtensionsToolbox.dll
System.Web.Extensions.dll
System.Web.Extensions.Design.dll

deploying apps using AJAX

These controls in the AJAX toolkit seem really nice, and I was able to get them working in my development environment. I was disappointed that when I published my app to the web server though it no longer worked. I'm trying to understand exactly what needs to be done on the server to get it working. I don't have a lot of control over what gets installed on the server, so this may be a problem. The error message I got indicated it was blowing up from these lines in my web.config:

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Appreciate any help on how I can successfully deploy this app using FTP (if possible).

Thanks,

***

Hi dschroth,

You need to make sure that the system.web.extensions dll is installed in the GAC on your server. This will solve your problem probably!

Regards,


hello.

any chance of copying the stack error info and putting it here?


Server Error in '/nmp' 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 12: <compilation debug="true" explicit="true">Line 13: <assemblies>Line 14: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 15: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> Line 16: <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>


Source File:D:\sites\NMP\web.config Line:14

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

Server Error in '/nmp' 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 12: <compilation debug="true" explicit="true">Line 13: <assemblies>Line 14: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 15: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> Line 16: <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>


Source File:D:\sites\NMP\web.config Line:14

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

Hello.

by looking at the stack trace, it looks like you don't have the AJAX dll installed on the GAC. If you're able to run your web app at full trust, then you should copy the ajax dll into your bin folder (note that this will only work if you're able to configure your app to run at full trust)


When I published the app, it put both AJAXExtensionsToolbox.dll and AjaxControlToolkit.dll into the bin folder. Are they the AJAX dll you mean? If so, how can I configure the app to run at full trust?

Thanks for your help!


nope,

the system.web.extensions

succes!

Regards,


Whoever owns your server has to do it via the code access security settings, or else (as stated) install the dll to the GAC on the server. If you're working w/ a hosting company just renting a virtual directory, then the company will either advertise that they support AJAX extensions, or else you're probably out of luck w/ that one.


i hate to be stupid, but how do you install a dll to the GAC?


HI dschroth,

check the following link:

http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

Regards,


Sorry maybe a bit overkill open Visual studio command prompt and add:
gacutil /i YOURDLL.dll
Regards,

hello.

in this case, running tha ajax installation pacakage will do just that.

adding a dll to the gac is simple: you just need to drop it in windows\assembly folder or run the gacutil from the command line.


thanks everyone for your help - I guess it's easy when you know how. apparently all I needed to do was drop the System.Web.Extensions dlls into the bin folder on my development machine, and then the publish process put them on the server.

***


I am having a similar problem with trust issues. I run the site in house on a server so I really do not have a problem with full trust issues. The site runs on IIS 5.1. What do I need to do to set for Full Trust?

Thanks for the information.

Delete key not working with Firefox and FilteredTextBoxExtender

I'm using FilteredTextBoxExtenders for my textboxes with filtertype set to numeric. Everything works fine in IE but in Firefox, the delete key and arrow keys will not work in the textbox. Backspace key does work. This is a problem if the user needs to change the contents of the textbox after somethng has been entered. Is this a bug, is there a fix?

I'm also having this problem, has anybody found a solution to it?

Thanks


Just wondering if a solution had been found, as I'm struggling with this too, and it's not too well documented on the web

Wednesday, March 21, 2012

Delayed events.

i've been working on this all day and haven't made it very far.

I have 3 combos in an updatepanel with autopostback =true. combo 2 is dependant on 1, and combo 3 is dependant on 1 or 2. When i select a value for combo1, it's SelectedIndexChanged fires. Inside his procedure there is code to set the values of the other combos. The SelectedIndexChanged events don't fire for the other combos. Instead they wait until another button has been pressed then they fire before that buttons clicked event. I've tried calling the update method of the updatepanel within the selectedIndexChanged event of combo 1 but this doesn;t help. i've also put each combo into it's own update panel and tried calling their update method from combo1 changed event, but no success their either. is there a way for me to force the queued events to fire?

any help would be appreciated,

thanks

kenny.

No need to reinvent the wheel; I'd recommend using theCascadingDropDown control.

-Damien


cheers damien,

i'll take a look into it.

Declarative Markup within a server control

I'm creating an address control that is utilizing Atlas in a couple of places. The first place I use it I've got the javascript functions working fine. (It auto fills the address based on the zip code.)
After the autofill, the user is allowed to type in changes as needed. I was going to use the autocomplete in the state portion, and was going to use the declarative markup similar to the HOLs. When putting two of the controls on a page I was registering two declarative blocks, and they don't work. I tested it in straight HTML outside the control and got the same result. However, in the HTML test I combined it to one block (below) and it works fine.
My problem is how to get the control to render one block of declarative markup if more than one of the same control exists.
Script

<scripttype="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
<!-- Repath the following src attributes, using regular client relative paths as necessary -->
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
</references>
<components>
<textBox id="Address2_txtState">
<behaviors>
<autoComplete
completionList="completionList"
serviceURL="Services/AddressAutoComplete.asmx"
serviceMethod="GetStateList"
minimumPrefixLength="1"
completionSetCount="10"
completionInterval="500" />
</behaviors>
</textBox>
<textBox id="Address2_txtState">
<behaviors>
<autoComplete
completionList="completionList"
serviceURL="Services/AddressAutoComplete.asmx"
serviceMethod="GetStateList"
minimumPrefixLength="1"
completionSetCount="10"
completionInterval="500" />
</behaviors>
</textBox>
</components>
</page>
</script>


I don't think I exactly understand your problem. Could you maybe share the code that resulted in "two declarative blocks"?

My original design created one declarative block per server control. As long as I only have one control, that works fine. As soon as I drop the second one on the page, neither of them work because I get two blocks (below), rather than the one block needed in my original post.

<scripttype="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
<!-- Repath the following src attributes, using regular client relative paths as necessary -->
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
</references>
<components>
<textBox id="Address1_txtState">
<behaviors>
<autoComplete
completionList="completionList"
serviceURL="Services/AddressAutoComplete.asmx"
serviceMethod="GetStateList"
minimumPrefixLength="1"
completionSetCount="10"
completionInterval="500" />
</behaviors>
</textBox></components>
</page>
</script>

<scripttype="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
<!-- Repath the following src attributes, using regular client relative paths as necessary -->
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
</references>
<components>
<textBox id="Address2_txtState">
<behaviors>
<autoComplete
completionList="completionList"
serviceURL="Services/AddressAutoComplete.asmx"
serviceMethod="GetStateList"
minimumPrefixLength="1"
completionSetCount="10"
completionInterval="500" />
</behaviors>
</textBox></components>
</page>
</script>


Interesting. All server-side Atlas controls should render their scripttags to 1 AtlasTextWriter, which will write the contents inside asingle script tag. At least that's what it is supposed to do.
Do you have a repro that results in the code you pasted?

As I understand it, you have created a custom composite server control? How are you rendering out the declartive block? Are you just string.building? Maybe you should look into this AtlasScriptWriter the other poster mentioned.

Does anyone have any more info on this AtlasScriptWriter (or AtlasTextWriter)? Is this the recommended method for rendering custom Atlas controls?

decimal data type

Hi all,

I am having trouble working with the decimal data type in the client side js. I am returning this custom object that has decimal properties. When I try to ready the value of these properties in javascript I get an object type.

How can I get the values?

Decimal should be working well. e.g. I just tested with a simple EchoDecimal method, and it correctly round trips the number I pass in:

[WebMethod]

publicDecimal EchoDecimal(Decimal de) {

return de;

}

What do you mean by "I get an object type"? Have you tried using fiddler to make sure the data over the wire looks proper?

David