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

Wednesday, March 28, 2012

why should i not use magic ajax?

can any tell me , what are the disadvantages of magic ajax?

or any bottle neck? its very easy to use, and its working, but i have to take desccion either to use it or not? please share your experience with magi?

Magic AJAX might not integrate with ASP.Net as seamlessly as ASP.Net AJAX. Remember ASP.Net AJAX and ASP.net both are build by the same company Microsoft. They know better how both work so they can make integration very tight. Furthermore, ASP.Net AJAX is free why would anyone go for Magic AJAX?


It doesn't look very mature, compared to ASP.NET AJAX, and you'd be drastically limiting your support options by going with an obscure framework.

Why avoid ASP.NET AJAX?


hmm, ok thanks for both of you, i dont know i install ajax tookit but its not working, :(

and i found magic ajax very easy,,, any way, i ll try my best to use asp.net ajax rather magic,

Thanks Alot


hai magic ajax for asp.net 2.0 is not supporting page store mode session..we used magic ajax for our application asp.net 1.1 .after porting it to asp.net 2.0 ..problem comes ,in asp.net 2.0 magic ajax only support nostore mode.our code is based on session mode...thanks
hai magic ajax for asp.net 2.0 is not supporting page store mode session.. we used magic ajax for our application asp.net 1.1 . after porting it to asp.net 2.0 ..problem comes ,in asp.net 2.0 magic ajax only support nostore mode. our code is based on session mode... thanks

I started using Magic Ajax over a year a go just before "Atlas" (now called MS Ajax) came out. I have to say it was easy to get it to work but I started to problems with getting things like paging on gridviews to work. The problem with this was that I just couldn't get any help or support on the issue, so I switched to Atlas\MS Ajax and never looked back.

Go with MS Ajax, at least you are guaranteed upgrades and updates to it and fairly good support from the community and MS. And also loads of documentaion and examples on the web. Magic Ajax just cant compete with that and will eventually die out. You need to work with things that have a future and will be supported and upgraded. If you are building asp.net apps and want to use Ajax then you should use MS Ajax, there is no reason not to.


what about session mode in magic ajax in asp.net 2.0

Why slow UI with AJAX?

I am working on a page that displays paged ResultSet from a database. I created the page without AJAX update panels. Later I added those to ajaxify my application. The problem is when I change pages in my GridView the time it takes for it show the new results (using Asynchronous postback) is about 4 secs more then a regular postback.

Does any one know why it is slow. I usedfiddler tool to check the response size and Asynchronous postback does come back with less number of bytes but why slow UI update?

Thanks for your help.

The thing that will effect your AJAX postback the greatest is the size of your ViewState.

Comment out your update panels & script manager and then enable tracing for your page.<% @.Page Trace="True" %>The trace information will show you exactly how large your ViewState is for that page. Try paging through your GridView and see if you ViewState size grows as you page. Even if the size doesn't grow, if the initial ViewState size for your page is very large, it will cause long delays between AJAX postbacks. If you do find that your ViewState is huge, or it grows between postbacks, try to figure out which controls you can disable the ViewState for (EnableViewState="False") or what might be causing your ViewState bloat.

Just as an FYI, I have used UpdatePanels with GridViews in many different cases without a problem. I did have to tune the ViewState for some of the pages I made to speed things up, but it can definitely be done and it works great.

-Aaron


I am totally agree withSchnieds , that you have to disable the viewstate wherever it is not necessary..

Do one more thig also..try to set <compilation debug = "false" > in web.config

Hope it will help you.Smile


Thanks for your replies. I tried to turn the viewstate off for the gridview but then my pagging gets all screwed up. I have a dynamic paging option where user can select the number of results displayed per page. When I turn off the viewState it gets set to the default value (which is 14) and the page index gets set to 1.

Any ideas?

P.S.: I do have the <compilation debug="false" />


You probably won't be able to disable the ViewState for your GridView, but you may be able to disable it for other controls on your page and decrease the overall ViewState size.

Turn on tracing as I suggested, figure out what control(s) have a large ViewState and look for the other things I mentioned in my previous post. You should be able to determine what is causing your ViewState bloat very easily with the tracing turned on.

-Aaron

Why?

Why is it that the example below works just fine, but if I move the updatepanel anywhere else, it stops working? It won't work if I put it directly below the asp:Panel. It won't work if I put it inside the <table>... Is there some rule I should be following here for where an updatepanel should be placed?

<asp:Panel ID="pnlOptions2" runat="server"> <tr> <td valign="top"><strong>Additional Options</strong></td> <td colspan="2"> <asp:UpdatePanel ID="upOptions2" runat="Server"> <ContentTemplate> <table cellpadding="0" cellspacing="0" width="650"> <tr> <td width="175"><asp:CheckBox ID="cbTransparencies" runat="server" Checked="false" AutoPostBack="true" />Transparencies</td> <td width="125"><asp:CheckBox ID="cbLetter" runat="server" checked="false" AutoPostBack="true" />Letter</td> <td width="175"><asp:CheckBox ID="cb11x171" runat="server" checked="false" AutoPostBack="true" />11x17 1's</td> <td width="175"><asp:CheckBox ID="cbPaper" runat="Server" checked="false" AutoPostBack="true" />Provided Paper</td> </tr> <tr> <td><asp:CheckBox ID="cbNCR2" runat="Server" checked="false" AutoPostBack="true" />2 part NCR</td> <td><asp:CheckBox ID="cbLabels" runat="server" checked="false" AutoPostBack="true" />Labels</td> <td><asp:CheckBox ID="cb11x172" runat="server" checked="false" AutoPostBack="true" />11x17 2's</td> <td><asp:CheckBox ID="cbLaminate" runat="server" checked="false" AutoPostBack="true" />Laminate</td> </tr> <tr> <td><asp:CheckBox ID="cbNCR3" runat="Server" checked="false" AutoPostBack="true" />3 part NCR</td> <td><asp:CheckBox ID="cbTabs" runat="server" checked="false" AutoPostBack="true" />Tabs</td> <td><asp:CheckBox ID="cbCards" runat="server" checked="false" AutoPostBack="true" />Business Cards</td> </tr> <tr> <td><asp:CheckBox ID="cbNCR4" runat="Server" checked="false" AutoPostBack="true" />4 part NCR</td> <td><asp:CheckBox ID="cbCerts" runat="server" checked="false" AutoPostBack="true" />Certs</td> <td><asp:CheckBox ID="cbBrochures" runat="server" checked="false" AutoPostBack="true" />Brochures</td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> </td> </tr> </asp:Panel>

The UpdatePanel prefer to work within a DIV or a SPAN object. Try setting the RenderMode property of the UpdatePanel toInline


See it here for RenderMode property, try to set it

http://www.asp.net/AJAX/Documentation/Live/mref/P_System_Web_UI_UpdatePanel_RenderMode.aspx

See for most common problem of UpdatePanel

http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx

Monday, March 26, 2012

Will Atlas Work With Opera 8.60 for Pocket PC?

myAtlas Update Panels are working fine when i access the page from a standard desktop Opera browser. However the page is posting back when i do the same thing from within the PDA. the PDA is running the latest 'Opera 8.60 for Pocket PC' browser.

can i somehow configure the Atlas or the page so that it will work on the PDA browser? or am i on a hiding to nothing?

thanks

I don't speak for the ASP.Net team; however at this time there is no real 'support' for mobile devices (so yours being opera is not a slant). Currently there is some Opera desktop browser support and they are looking at expanding it. As with all new tools we get to play with - mileage will end up varying - however if you are familiar with Java Script... there may be a means for you to roll your own if its a mission critical scenario... However, personally - I don't think right now the focus is in provding mobilie support as it is more inline to polishing desktop browser experiences... NOt to sy it won't won't happen.. but usually mobile applications don't rely on the jazzability that memory / cpu intensive desktop browsers can utlize...

Willing to bet money that you cant figure this out!

I am working on this app... I have an iframe (hidden) in the app, and an image (also hidden) that eventually gets put into the iframe for printing.

My javascript is thus...

var img = "ctl00_ContentPlaceHolder1_cpnImage";
var daframe = document.getElementById("cpnframe");

document.getElementById("cpnframe").width = document.getElementById(img).width + "px";
document.getElementById("cpnframe").height = document.getElementById(img).height + "px";

frames[daframe].location.href = document.getElementById(img).src;
frames[daframe].focus();
setTimeout('frames[daframe].print()',10);

Now, when I run this on a regular HTML page, it works fine...

In my asp.net page, I get javascript errors stating that frames.cpnframe has no properties.

What gives?

What does the iframe look like in the HTML code generated by the ASP page compared to the HTML code in the regular HTML page where it works?


I believe it's in how you are referencing the frames. This article explains how to access frames properly.

http://www.quirksmode.org/js/frameintro.html


The iframe is the same either way. It not server side. I have looked at the page source on both and they are identical...

Very strange!

Win2k Server problem ... Could not load Assembly "App_Web_xxx"

Is anybody else having problems deploying an AJAX enabled web site to Win2K Server? I am developing on XP and everything is working fine, but when I deploy to my production server none of the .aspx pages work. They all produce messages similar to:

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load the assembly 'App_Web_nh6rut9z'. Make sure that it is compiled before accessing the page.

Source Error:

Line 1: <%@dotnet.itags.org. page language="c#" inherits="TrailerParkC.TelemetryMain, App_Web_nh6rut9z" %>Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >Line 3: <HTML>

I have read though many of the posts here and nothing seems to fix this. BTW, I do have the Microsoft.Web.Preview.dll in my /bin directory, but that doesn't help. Seems as though something is not being registered/generated correctly during the compile process?

Any help would be greatly appreciated.

Thanks.

Hi,

i had the same problem, you need to create an web site application in your iis.

To do this goto start->settings->control panel->Administrative tools->Internet services manager ->open properties on your web site folder-> under "Directory" tab, click the Create button under "Application name" textbox.

hope that helps.

toma.

Windows forms like Grid

Hello,

I have been working on converting a windows app to web app. Windows app has nice grid where users can enter data or edit by just clicking on the column.

For web environment, I tried to use gridview/detailsview but it requires users to click on update or insert button. Is there something built-in or AJAX based or any solution (not too costly) that provides windows like grid in asp.net 2.0?


Thanks,

VP

None that I can think of.

Thanks for giving details about the implementations. Though is seems like a lot of form elements making it heavy during postbacks. Has anybody done what you are suggestions or something similar? It would be great to get hands on it.

Here's what I might end up buying:

dhtmlxgrid

or codethatgrid

Thanks,

vp


Ofcourse there is a solution for that :-)

With just some creativity, you can create something like that, with a gridview and Ajax.

One direction to create a direct click grid, is to put the gridview in a updatepanel.
After that put a linkbutton in every cell to hold your data.
Attach a edit row_command to the linkbutton .
Use some css to have the linkbutton a 100% (cell) height and width.

In the codebehind of the row_command event, you can easily track the cell that is clicked.
You can even use the row databound event to open a textbox in the clicked cell , or someting like that.

Marchu


Hello,

You are right about the heavy postback, ± 50 rows with 32 cells make a 730 kb page. (in my case)
What i do is, when i change 1 cell, i change this cell directly in the grid, so i dont have to load the full data again. (only Ajax must draw the grid again, what take some time...5secs)

It is not a perfect solutions this, but i been looking and experimenting for a better one.
If i found one, i will post it here.

Marchu


I decided to go withdHTMLxGrid which seems to meet my needs.

I can add data to the grid from code-behing by emitting javascript and then read data back using javascript and copying data to a hidden text field in CSV format which I grab on postbacks. This is the only grid I found which has cell + rows tabbing and allows editing cells without needing any extra keystrokes.

Standard version is free and pro is $150

Thanks for your responses


vp

Without installing Atlas, Website application is not working in IE

Hello,

I am developing Website Application using VS 2005 with .NET 2.0 and Atlas June CTP. I am using Atlas framework in the existing project. Hence I have added reference of Atlas.dll and modified Web.config

In the project, I have one user control (ascx) and one aspx page. The user control is included in aspx page. The user control has two dropdown lists. The second list is getting populated depends upon the selected value from first list. This is done by using Atlas. The UpdateControl is added into this page. The Script manager is added in aspx page.

If the application is launched on the machine where Atlas is installed, it works only on that machine in both browsers (IE and FireFox). It is not working if anybody accesses this website remotely through browser from machine where Atlas is not installed.

If the application is launched on the machine where Atlas is not installed and accessed the local website through browser, the "SelectedIndexChanged" event is not getting triggered. If I add "ScriptLibrary" folder in the application, it is working in FireFox but not in IE. In this case,do I need to add any assemblies apart from Atlas.dll to make it work in IE and without installing Atlas?

Thanks in advance,

Milind

hello. the atlas dll is the only thing you need to have in your bin folder to get the updatepanel working. btw, how are you accessing the web site from the machine that has the app installed? are you using localhost/... or localhost: portnumber/... (ie, are you using the internal server or IIS when you access the site on the server?)


Hello,
I am accessing localhost using IIS.
On the test machine (where Atlas is not installed), if I deploy website application which has Atlas.dll and ScriptLibrary folder, "SelectedIndexChanged" event is getting triggered for FireFox but not in IE.

Thanks,
Milind

hello again.

weird stuff...btw, is this a public url we can see?

Saturday, March 24, 2012

Without installing Atlas, its not working in IE

I am developing Website Application using VS 2005 and Atlas June CTP. In the application, one page contains user control which has two Dropdown lists. Depending upon the value of first dropdown list, using Atlas, second list will get populated. I have added UpdatePanel control in user control (ascx page) for second list and Script manager in aspx page. I have added reference of Atlas.dll and modified Web.config also. This is working in IE and FireFox.
If I uninstall Atlas and run the application, it's not working in IE. To make it work in FireFox, I need to include "Scriptlibrary" folder into solution. But in IE, "SelectedIndexChanged" event is not getting triggered.
The application is working fine for both the browsers on machine where Atlas is installed. Which other assemblies are required to run Atlas on the machine where Atlas is not installed?

Thanks in advance,
Milind

hello.

well, if you're not using the atlas toolkit, then you only need the atlas dll.


Hello,
I am not using Atlas toolkit. Atlas.dll is already present in the "Reference" but still it's not working. Everything is working fine on developer's machine where Atlas is installed.

Thanks,
Milind

hello again.

the only thing that occurs to me is if the web site is not configred as a web app or is not using asp.net 2.0...

Wizard Control problem

This is an interesting one, although I did have it working earlier, it has since ceased to function.

I have a wizard control in an update panel on a user control on a page which uses a master page. oh, on a second note, a calendar extenders style / theme seems to break if the calendar control is not on the first page displayed in the wizard bar; but thats another story and not my immediate consern.

the problem is, that the next button returns a javascript error " 'null' is null or not an object, line 105 " ... but the odd thing is that it only breaks on the second page, so the first click of the next button works and sends you to the second page, but the second one does not work.

There is some code under the next button;

Protected Sub Wizard1_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.NextButtonClick
If Wizard1.ActiveStepIndex = 1 Then
'some code here
end if
end sub

but it still breaks even if I comment out all the code or change the index from 1 to 2...

Thanks for reading this far, it was a bit of a long post.

Scott

you should go to your Internet Explorer's Internet Options and then go to the Advanced Tab. There you can check out 2 options: "Disable script debugging (IE)" and "Disable script debugging (other)".

Check these out and then debug. Then you can go into more detail about the javascript error.


the only extra i can add to the error message is this

Line: 104
Char: 5
Error: 'null' is null or not an object
Code: 0

I suspect that the javascript error is in the Update Panel, but im not sure...

Sorry.


Hey scott,

since nobody responded with something useful, ill give it a try ...

The error you are getting is very wide. This error can be thrown everytime an object isn't initialised at the moment you try to allocate a value to it.

because the error is so wide it's not easy for us to give a straight to the point answer.

You could try to strip down the problem into a demoProject which replicates the error so its very easy for everyone to follow what's going on.

Another thing you could do is look at the way your wizard runs through its pages. How is it set up? When creating wizards I would go for the multiview with serveral views in it for each wizardPage and then some buttons for the navigation. I made some sort of tabsControl with a multiview in an updatepanel and some navigation and all works fine :p

Good luck!


Thanks for the reply.

It gets weirder every time I look at it. In Mozilla FF it works fine; it seems only IE7 (not tried <6) stops me moving between the pages of the wizard control.

After what you said, a thought did occur to me, it stops on the page after the page containing two ajax calendar controls... but this was the wrong line of enquiry so i copied my script and progressivly removed parts until it started working.

I think this is caused by a common variable in the javascript between "something" and the required field validator control. I am using:

Modal Popup
Calendar Extender
Update Panel
and Required Field Validators

and it works fine when I remove all the validators.

I am a little behind schedule now, but I will try and recreate this on a new project later and if I get the same results with the error, it might be a small bug.

Thanks for the advice btw,

Scott M


I found out how to fix it, apparently its the required field validators use an old API to register their script !? there is a post on here somewhere (which I failed to find) that has a link to a recently compiled version of them which works flawlessly.

working AJAX with a paging user control

Hi,

I am currently working with embedding AJAX into a previously developed website, and until now have had no issues, what i am trying to do i am not sure is possible, let me explain...

I have a simple web form which contains a repeater, and a user control (which is used for paging "ucPaging"), this user control has a dropdownlist embedded in it. I want the drop down list to fire an AsyncPostBackTrigger to the upnlPlayers update panel, and the repeater to use the SelectedValue of the dropdownlist in the paging user control.


I have tried to create a new AsyncPostBackTrigger in the code behind of the main aspx page, but at runtime, it says that the dropdownlist does not exist. Is what i am trying to do possible? I really don't want to have to resort to using the ASP paging control that is provided, as i am potentially returning hundreds of thousands of records.

Provided is the code in the main Players.aspx page...


<controls:Paging ID="ucPaging" runat="server" />
<ajax:UpdatePanel ID="upnlPlayers" runat="server">
<ContentTemplate>
<asp:Repeater ID="repPlayers" runat="server" OnItemDataBound="repPlayers_OnItemDataBound"....... etc etc etc you know the deal

</ContentTemplate>
<Triggers>
<ajax:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
</Triggers>
</ajax:UpdatePanel>

And the user control code...

<div id="Paging">
<div class="Previous"><asp:HyperLink ID="hlPrevious" runat="server" /></div>
<div class="Page"><asp:Label ID="lblViewingRecords" runat="server" /> <asp:DropDownList ID="ddlRecords" runat="server" OnSelectedIndexChanged="ddlRecords_OnSelectedIndexChanged" AutoPostBack="true" /></div>
<div class="Next"><asp:HyperLink ID="hlNext" runat="server" /></div>
</div>

Thanks for your help!

e

Since the DropdownList is in User Control, You have to add it as programmatically rather than declaratively. For Example in the Page load event add the following codes:


if (!IsPostBack)
{
AsyncPostBackTrigger tr = new AsyncPostBackTrigger();

tr.ControlID = YourDropDownList.ClientID;
tr.EventName = "SelectedIndexChanged";
YourUpdatePanel.Triggers.Add(tr);
}

Working Ajax asp page installed on Win2003 server gives scriptmodule error due two two ver

LS,

I'm using VS2005 C#. I installed VS 2005 SP1 and than I installed Ajax support.

I made my website and on my development PC it works.

On my windows 2003 server (with the windows 2003 SP1 installed) I have no VS (so no VS 2005 SP1), it is just a server.

The older version of my website without Ajax is perfectly accessible through the internet. However when I install my new website (I first did install the Ajax setup.MSI and the ASP.net 2 redistributals were already installed as they were needed for my previous version of the website) my website is no longer accessible, it produces an error.

When I now access my page through the internet from my server I get the following configuration error (in the web.config file):

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Should I copy System.Web.Extensions.dll from my development PC to the server (if so where to?)

My guess is that there should be no need to manually copy files, so what is the problem. Is there a different setup to install Ajax support on a Windows 2003 server?

I hope someone has the answer and is willing to help me.

Kind regards

Clemens Linders

I found a thread stating that I needed to copy the System.Web.Extensions.dll's to the bin folder of my project and than publish the website.

So I did and luckily the error above was gone, unluckily I got another error (seems a lot like the first one but the error above originated from the web.config file and this originates from the ASPX file).

I still hope anybody can give me a clue.

The error is (unfortunately partially in dutch, I put a translation between the curly brackets {}):

Serverfout in toepassing /.

Parser-fout {Parser-error}

Beschrijving:Er is een fout opgetreden bij het parseren van een bron die vereist is om aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze parser-fout en pas het bronbestand waar nodig aan. {Description: there was an error ......}

Parser-foutbericht:Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040){Parser-errormessage: Cannot load the file or assembly System.Web.Extensions...or one of it's dependancies. The manifestdefinition of the found assembly doesn't concur (isn't the same) as the referenced assembly}

Fout in bron: {error in source}

Regel 3: <%@dotnet.itags.org. Register Assembly="WebChart" Namespace="WebChart" TagPrefix="Web" %>Regel 4:Regel 5: <%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Regel 6: Namespace="System.Web.UI" TagPrefix="asp" %>Regel 7:


Bronbestand:/Default2.aspx Regel:5

Laadtracering van assembly: U kunt de volgende informatie gebruiken om vast te stellen waarom de assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35niet kan worden geladen.

WRSCH: registratie van assembly-bindingen is uitgeschakeld.Als u assembly-bindingsfouten wilt registreren, stelt u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) in op 1.Opmerking: er is een prestatiestraf gekoppeld aan de registratie van assembly-bindingsfouten.Als u deze functie wilt uitschakelen, verwijdert u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog].

It is as if it's complaining about a wrong version but I only downloaded ONE version of Ajax and I only have this version on both my development PC as deployment server.

On this site I also found a thread regarding this parser-error. In that thread someone asked if AjaxControlToolkit.dll was installed. I do not have a AjaxControlToolkit.dll (I do have AjaxExtensionsToolbox, but also copying that into the bin-map didn't help). Furthermore the same solution was offered to copy the System.Web.Extensions.dll't to the project's bin folder. Luckily for that person it did the trick for him, but I already did this. Another option that was mentioned is to give the command gacutil -f system.web.extensions.dll. So I copied gacutil to the bin-folder of my server. from CMD (DOS) I executed gacutil -f system.web.extensions.dll

And the result was: system.web.extensions.dll is an invalid option?? (it is in the same bin-folder)

I also downloaded and installed The AjaxControlToolkit. I put the AjaxControlToolKit.dll in the bin-folder of my project, I published the website and still I get this error.

So to repeat in short what I did was:

I installed Ajax both on my developer PC and windows server 2003 deployment pc. I copied system.web.extensions.dll + system.web.extensions.design.dll + AjaxControlToolkit.dll (+ some other dll's) to the bin-folder of my project. I published the website to my server and still I run into problems.

Any ideas?

Kind regards,

Clemens Linders

-------------------------------

Update on my problem (unfortunately it is still there)

As some people in this forum mention that they also have VS installed on their server I installed VS 2005 on my server.

Than I installed the VS80 SP1 update and than I installed Ajax ASP.NET2 version 1.00

I even ran gacutil /i system.web.extensions.dll (also for the design dll)

As my problem persisted I copied the source of my website to this VS and compiled it (the system.web.extensions dll's and the AjaxControlToolkit.dll copied to the bin-folder). Surprisingly enough it did not compile and came up with more or less the same error.

Maybe this will help someone to identify my problem?? Is it an installation issue??

The error I got was:

Error 1 Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040) C:\Documents and Settings\Administrator\Mijn documenten\Visual Studio 2005\WebSites\RAT\Default2.aspx 5

Translation:

Error 1 cannot load the file or assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of it's dependancies. The manifest of the found assembly doesn't match the assembly reference........

The error points to line 5 of Default2.aspx which is:

<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI"TagPrefix="asp" %>

It's nice to see that 31 people (at this time) took an interest to look into my problem. I hope that this latest development can give someone a clue as to what actually is causing my problem.

Again thanks.

Clemens Linders

==============================================================================================================================

Finally I can report to you that I have solved my problem (thanks to a tip of my brother).

The error does seem to report that there are two versions of the system.web.extensions.dll. But how I only installed the Ajax asp.net 2 setup I got from the original Ajax website. But than I remembered I also installed VS Orcas Beta 1. And this installed a second version of the system.web.extensions.dll.

I saw in this forum that sometimes people said I looked into my GAC and saw. For newcomers (like myself) let me tell you that if you open c:\windows\assembly that you are actually looking in the GAC. For some people who have the same problem as I did, it is a matter to install the system.web.extensions.dll in the GAC. The way people advise how to do this on this forum is using gacutil /f system.web.extensions.dll (don't forget the design version as well). I found that first I needed to copy the gacutil (which I found after doing a search) in the seem folder as the dll and than still if I used /f I got an error but after doing gacutil /? it seemed far more obvious to do gacutil /i system.web.extenstions.dll (/i for install) which at least worked. My brother also told me that when you open the Assembly folder (or you may call it the GAC), you can add dll's to the gac by simple dragging them to the assembly folder (copy and paste doesn't work). And indeed this is a far easier way of adding dll's to the gac.

But as mentioned this didn't solve my problem. Although I could see that on my server I had the version 1.0.61025.0 installed and on my development system I had 1.0.61025.0 and 2.0.0.0 And than I realised that this 2.0.0.0 version had to come from the Orca Beta version.

I tried to cheat and also installed the 2.0.0.0 (which is 925Kb versus aprox 650Kb for the other version). But that didn't work.

I found that on the web.config file most references to the system.web.extensions.dll were made to 1.0.61025.0 but some were made to 2.0.0.0. Als the aspx file made reference to 2.0.0.0. I changed all these to 1.0.61025 but that didn't help. Suddenly the error on my server chnaged from line 5 to line 1.

When you publish the website a new dll is made by VS. and during publishing a reference is added to line 1 of the aspx file. Because I also had the 2.0.0.0 version of the system.web.extensions.dll in my GAC. A reference to this 2.0.0.0 dll is made in the dll that is created during publishing. I tried to remove this 2.0.0.0 dll by right-clicking it in the windows/assembly folder and choosing remove. But it kept saying it couldn't remove this file. It was being used. So that is when I was sure that this had to come from Orca.

Only when I removed Orcas and repaired VS 2005, my problem was gone.

I did get another problem though, my webservice suddenly sometimes doesn't give a response. I haven't debugged that yet but I found a reply on the interned of someone who also removed Orca and repaired VS 2005 and everything seemed to work accept for websites. Websites and webservices isn't the same but I guess I will remove VS 2005 and re-install it.

Despite that the golden tip didn't come from this forum I would like to thank the people who read this and at least tried.

The reason that I kept updating my problem and finally also mentioned the salution is that I hope that others will benefit.

OR BETTER: don't make the same mistake as I did and don't install a Beta version of VS on the same partition as where you have your VS that you really use

I hope that people will benefit from my mistake and what I have written here.

Goodluck

Clemens Linders


Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.42; ASP.NET Versie:2.0.50727.210

Hi, Clemens Linders

We appreciates that you share the solution so that the answer can be found and used by other community members having similar questions.

Thank you very much,You are so kind:)

Best Regards

Working Differently Remotely and Locally

Hi,
I'm just getting started with Atlas but and have a little sample working locally where I can drag an image around on the screen (little things...). When I upload to the server all I get is the page with none of the dragging ability.

I have installed .net framework 2.0 (before which the page didn't load at all) - is there anything else I need to do on the server?
It is a shared virtual server but I have admin remote desktop onto my share.

I'm sure it is a simple thing I've missed but I can't find out what it is.

Any help greatly appreciated.
Andrew

I assume you've uploaded the dll and web.config that you're using locally as well, right?

Can you provide a link to the online version? Who's the web host?

This problem when I've seen it before was a result of a problem with the WebResource.axd. In one case, the .dll was corrupt and so the resource was throwing out gibberish (you can see if that's the case by viewing yoru page's source after the server serves it and then copying and pasting the whole webresource.axd?...etc stuff into the address bar). In the other case, the host had a problem serving up the virtial file 'webresource.axd' and so I had to literally put a blank file named webresource.axd in the root of the site.

hope it helps

Paul

working from code behind with responsexml

I am working in the generic handler file

Can anybody help me working with responsexml

Hi,

responseXML is what you use to manipulate the response from the server on the client. It's not available on server side directly.

But you have full control on what will be returned to the client side in the ProcessRequest method. For example, the following handler returns a string "Hello World" which is the content of responseXML.

<%@. WebHandler Language="C#" Class="Handler" %
using System;
using System.Web;

public class Handler : IHttpHandler {

public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}

public bool IsReusable {
get {
return false;
}
}

}

Working in Dev but not on server

Hi

I am writing my first AJAX enabled application, and I am having problems deploying it. I have created a simple autocomplete app in VS 2005 which reads values from a SQL database and returns them as an autocomplete list. This works fine on the development machine, but when I publish the app and copy the files to the server, the AJAX part of the page does not work (non AJAX parts do) I have installed the ASP.NET AJAX from http://asp.net/ajax/ on both the server and the development machine. Following publishing the app to a local drive, the only change I have made is to the SQL connection string. I have stripped the web service down to a "hello world" application to remove the connection string from the equation and this still does not work. I would be very grateful for any ideas.

Thanks

Hi,

Could you please paste the error that you are receiving here?

Thanks


You must have to install the Asp.net Ajax Framework in you server. Also you have to have the AjaxControlToolkit dll in your web application bin directory to make it working.


Turns out it was somehow related to the firewall. Worked fine bypassing the firewall. Passed to sysAdmin to sort out.

Working locally (both IE & FF), only working in FF on live server

I just got my personal website (link) updated with some Atlas enabled stuff, right there on the front page you can do "Show Different Image" in the top left or use the Calendar's left and right arrows to go through the months without postback.... but... as the subject says

Running on my laptop here: Atlas CTP installed, using studio's built in web server:
- All functions work in both browsers (IE 6, FF 1.5.0.4)

Up on my web server: Atlas CTP installed, IIS 6.0
- FF works 100%, but IE spews javascript errors on page load

And it's weird, one time i get one error (and this is the common one, btw that line # shown doesn't have anything!):

Other times, IE is totally confused! (i do not have that many lines in that page needless to say)

I've already tried seeing what's going on with Fiddler, not sure what i am exactly looking for, but all looks well in that tools... and just for good measure i uninstalled Atlas on my server and reinstalled it, that didn't help things either

Any ideas? (link again)

So i got by this problem by installing theMicrosoft Script Debugger and seeing what IE was whining about and it was the javascript for Google Analytics causing the above problems (although it makes *no* sense why it worked 100% in FF)

So now I have the "css refresh" problem where IE/Atlas is working, but the whole page's CSS refreshes, i swear i saw a blog post by someone at Microsoft to fix it... gotta track that down

working very slowly

there i have another problem:

mygridview is populated ok , but works very slowly. I need to have about20 - 40 textboxes and dropdownlists on my page. i put on page ascriptManager and all control are putted in an UpdatePanel . when isearch a item in database , my gridview is populated very slowly..

it seems is related about viewstate, but i don`t know exactly...i need some help.

what is wrong?..how can i fix this problem?

Hi,

how's your network behaving? Did you also use SQL profiler to see how many sql requests there are executed when you update your grid? Try to split up all the controls in logical groups and use multiple updatepanels on your page. Also insert an UpdateProgress control so that an enduser sees that something's going on and needs to wait a bit.

Also know that a downside of the updatepanel control is that it goes through all events of the page life cycle up until the render event where it only renders the specific controls. Most knowledgable is that indeed ViewState is always sent back and forward so you don't gain any performance on that part by using the UpdatePanel.

Grz, Kris.


I made all controls from page with enableviewstate = false;

i put my grid ,textbox where i enter the text which is searched in database, and button to click in a update panel, and all textboxes in a another update.
When i search a text in database it works fine, my gridview it`s populatede relative quicly , but when i click on a item from gridview works slowly. :(

it could be from that connection to database(stored procedure)?

i really need some help...plsss...

this is the code that i use it:

protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
FillTextBoxes();
UpdatePanel2.Update();

selected = gridview.SelectedValue;

}

protected void FillTextBoxes()
{
ArrayList textBoxesArrayList = new ArrayList(18);
ArrayList dropDownsArrayList = new ArrayList(6);
for (int i = 0; i < 18; i++)
textBoxesArrayList.Add((object)UpdatePanel1.NamingContainer.FindControl("TextBox" + (i + 1).ToString()));
for (int i = 0; i < 5; i++)
dropDownsArrayList.Add((object)UpdatePanel1.NamingContainer.FindControl("DropDownList" + (i + 1).ToString()));

SqlConnection conn = new SqlConnection();
ConnectionStringSettings stringToConnect = ConfigurationManager.ConnectionStrings["ConnectionString1"];

conn.ConnectionString = stringToConnect.ConnectionString;
conn.Open();

SqlCommand sqlCommand = new SqlCommand();
sqlCommand.CommandText = "GetDetails";
sqlCommand.CommandType = CommandType.StoredProcedure;
sqlCommand.Connection = conn;

SqlParameter sqlParam = new SqlParameter();
sqlParam.ParameterName = "@.searchCriteria";
sqlParam.DbType = DbType.String;
sqlParam.Value = selected.ToString();

sqlCommand.Parameters.Add(sqlParam);
SqlDataReader rdr;
rdr = sqlCommand.ExecuteReader();
while (rdr.Read())
{
int i;
for (i = 0; i < textBoxesArrayList.Count; i++)
((TextBox)textBoxesArrayList[i]).Text = rdr[i].ToString();
for (int j = i; j <textBoxesArrayList.Count + dropDownsArrayList.Count; j++)
((DropDownList)dropDownsArrayList[j - textBoxesArrayList.Count]).SelectedValue = rdr[j].ToString();
}


Hi,

did you already used SQL profiler to see what gets called for 1 page on the database? It could be that you're generating a lot of commands that could bring SQL server to its knees. Also be sure to always close your connection. For this it's best that you use theusing() statement which disposes of your valuable resources itself.

Grz, Kris.


i have :

conn.Close();

and the select from database is simple... what to put in that using??


Theusing statement allows the programmer to specify when objects that use resources should release them. The object provided to theusing statement must implement theIDisposable interface. This interface provides theDispose method, which should release the object's resources.

i don`t use resource and ArrayList don`t implement that interface...that`s i think that is not a solution available for this problem


Hi,

dany_soft_2002:

i don`t use resource and ArrayList don`t implement that interface...that`s i think that is not a solution available for this problem

actually you do, by using the SqlConnection class. But the using statement had more to do with the Close() method of the connection.

Did you already check with SQL profiler what the load on the database server is?

Grz, Kris.


"Did you already check with SQL profiler what the load on the database server is?"

what did you meen, how many records have table in which i made that select?.. if you refer to this , answer is about 20.000.

i put in

using (SqlConnection conn = new SqlConnection())

and all that try in this using. it should to put every textbox, dropdownlist that i have in a using statement??

all is the same, until now...:( :(


Hi,

no, what I mean is, how many queries are executed while you're performing this action? You can see that by using the tool SQL profiler.

Also, how much time does it take to complete this method.

And yes, everything else goes inside the using statement.

Grz, Kris.


i put:

using (SqlConnection conn = new SqlConnection())

and in this using i put:

while (rdr.Read())
{
int i;
for (i = 0; i < textBoxesArrayList.Count; i++)
using ((TextBox)textBoxesArrayList[i])
{
((TextBox)textBoxesArrayList[i]).Text = rdr[i].ToString();
}
for (int j = i+1; j < textBoxesArrayList.Count + dropDownsArrayList.Count+1; j++)
using ((DropDownList)dropDownsArrayList[j - textBoxesArrayList.Count])
{
((DropDownList)dropDownsArrayList[j - textBoxesArrayList.Count]).SelectedValue = rdr[j].ToString();
}
}

what i found:

i have a dropdownlist populated with 20.000 record . when i remove from my page this dropdownlist, everything works fine. (first dropdownlist from that array)

but, i need dropdown...how to do ??

now i search on web about sql profiler, and i will tell you the answer.



Hi,

dany_soft_2002:

i have a dropdownlist populated with 20.000 record . when i remove from my page this dropdownlist, everything works fine. (first dropdownlist from that array)

but, i need dropdown...how to do ??

20.000 records into one dropdownlist? No wonder you're having problems. If it really needs to be that many I suggest that you rethink your application because no one will be able to find the specific data (s)he needs in such a large list. I propose that you split them up in categories and subcategories so they become more maintainable. Then you can use the Cascading dropdownlist extender to first choose a category, then a subcategory and finally the one that the user's after.

So don't bother to choose any further for SQL profiler for the moment but first tackle that dropdownlist problem! Besides that SQL profiler ships with SQL server so you need to install it on your pc.

Grz, Kris.


i tried to reduce the number of records from that dropdownlist. it work`s faster. Thx a lot for your time.

Give me some links, from where to study about sql profiler...have something like that?


Hi,

you can begin withMonitoring with SQL profiler. Or google for it:http://www.google.be/search?hl=en&q=using+sql+profiler&meta=.

Grz, Kris.


i found the problem:

i have a dropdownlist and when i`m databinding it , it will have about 5000 of records. when i remove this databinding all works fine.

what can do i to improve this dropdownlist??


Hi,

dany_soft_2002:

i found the problem:

i have a dropdownlist and when i`m databinding it , it will have about 5000 of records. when i remove this databinding all works fine.

what can do i to improve this dropdownlist??

I thought we were clear on this matter. Please do as I suggested in my former post:

... it really needs to be that many I suggest that you rethink your application because no one will be able to find the specific data (s)he needs in such a large list. I propose that you split them up in categories and subcategories so they become more maintainable. Then you can use the Cascading dropdownlist extender to first choose a category, then a subcategory and finally the one that the user's after.

With other words, don't try to have more than 100 items in your dropdownlist. Maybe a bit more but certainly not thousands.

Grz, Kris.

Working with a returned DataSet

After I returned a DataSet through a WebMethod, how do I work with it?
I didn't understand this part of Atlas.

1. I loop through this DataSet creating new dynamic tables, trs and tds to display this data?

2. Can I bind it to an asp.net control like a GridView and it willautomatically update the control via JS, just like it happens on theserver side binding?

I tried looping through the returned DataSet but it has some weirdfunctions and attributes not quite like a DataSet... so... how do I useit?

function RetInfo(id)
{
PageMethods.RetDataSet(id,OnComplete);
}

function OnComplete(ds)
{
//do something with the DataSet
//ds.Tables (?)
}

[WebMethod]
public DataSet RetDataSet(int id)
{
DataSet ds = new DataSet();
//...get data from the database
return ds;
}

I recommend you check out this writeup by Garbin:

http://aspadvice.com/blogs/garbin/archive/2006/03/05/15591.aspx


You might want to review this page as well:

http://atlas.asp.net/docs/atlas/doc/data/default.aspx#datatable


Thanks man, that's exactly what I was looking for.

Just two more questions though:

1. If use that xml binding, can I use a PageMethod instead of a webservice as DataSource?

2. And, is a PageMethod considered a WebService? Will it have the same security issues as WebServices do (like being accessible to anyone)?

Thanks!

working with AJAX?

Hi..

I wanted to use AJAX in my existing website. I refered the Ajax dll and then in my aspx page, i wrote the code as:

<asp:ScripManager ID="ScriptManager1" runat ="server" />

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

<ContentTemplate><asp:ButtonID="btnDisplayDestColumn"runat="server"OnClick="btnDisplayDestColumn_Click"Style="z-index: 118; left: 466px; position: absolute; top: 302px"Text="Display Dest Column"Width="176px"/>

</ContentTemplate>

</asp:UpdatePanel>

Is this the correct way to work with AJAX? I am still get the flickering, and i know its not right.. Is there anything else that i should use? please help with working AJAX..

What kind of browser do you use? Some browsers are not yet supported ( if they're not, the page will do a post back instead of partial render). Did you get any javascript error?
I am using Internet Explorer 6, Is the code that i posted earler correct? i didnt get any error. Is there any javascript code to be included

hello note when you use tha ajax control you must"btnDisplayDestColumn_Click out side of the updatepanel and

tha action happend when you click the "btnDisplayDestColumn_Click this action must in updatepanel like loading data to gridview or other

and you must have refrence to ajax control

you must use the other controls with compatibility with ajax


Hi..

Thanks for the reply. But i am sorry, i couldnt understand. Could u please explain with the code i have given

Working with Ajax Toolkit Controls from JavaScript

I can't seem to find any documentation on using Ajax toolkit controls from java script. I want to know how to obtain a ref to one like other controls ex. (var ctrl = document.forms[0].TextBox1); also is it possible to set properties and call methods form Java Script?

Hi,

The key to manipulate extender via javascript it to find the corresponding behavior object, and invoke methods on it.

First, you need to specify a BehaviorID for the extender. For instance:

<ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelExtender2"
BehaviorID="cpe2Behavior"
runat="server"
TargetControlID="panel3"
ExpandControlID="panel4"
CollapseControlID="Panel4"
Collapsed="True"
TextLabelID="lnk2"
CollapsedText="Show Details.."
ExpandedText="Hide Details.."
>
</ajaxToolkit:CollapsiblePanelExtender>

Then, use $find method to get it and invoke methods.

var cpe2Behavior =$find("cpe2Behavior");
cpe2Behavior.add_expandComplete(expandedHandler);

Currently, I'm not aware of any formal documentation about what methods or properties are available to each extender, but you can find them in the source code of it.

Hope this helps.


I tried that but theAccordion control dosn't seem to have a BehaviorID property


Accordion doesn't have this property. You can use its clientID instead.