Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Wednesday, March 28, 2012

ASP.NET AJAX RC on PROD server is not working

Hi

I have a sample ASP.NET AJAX application built using ASP.NET AJAX RC. it AJAXes and it does behave as expected on VS 2005. When i deployed it on my local server. It does not AJAX and get the following javascript error

Error:'Sys' is undefined

am running XP Pro, SP2 & IIS 5.1. earlier i had not installed any beta releases or ATLAS. i dont see what is going on.

thanks in advance for the help

Anil

7 pages of posts just like this, lots of solutions and things to try in there

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

ASP.NET AJAX not working in IIS 6.0

I have a scenario where my AJAX application is not working in IIS but is working correctly in ASP.NET Development server. I dont understand the difference between these two except for the context in which the application runs. Am I missing any setting. I tried checking web.config and reconfirmed it to be correct when I found this application working on ASP.NET Development server.

help me in this-----

Hi,

first: AJAX working on IIS 6, i have a production application in this environment without any problems.

Have you got installed the ASP.NET AJAX framwork or have you only copy the DLL into the bin directory?

What kind of error messages comes up? Can you explain the errors you have?

Have you setup the application inside the IIS correct, configured the right ASP.NET Version?

Regards
Marc André

ASP.NET AJAX for Web Application Project (WAP)

Has anyone successfully use the new AJAX controls in a WAP?

I'm getting this error when I try to use the web.config from an ASP.NET AJAX Web Site in a Web Application Project.

Error 8 The type 'Microsoft.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Beta 2 and Futures Nov CTP from this website - http://ajax.asp.net/docs/Default.aspx
Try to download Ajax Control Toolkit from this website - http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx
Try to read Ajax materials document from here -
After you install Ajax Beta 2 and Futures Nov CTP in your PC,try to create a new Ajax Enabled website and a Ajax CTP Enabled website and check if it works.
Besides,try to check your web.config according to the following web.config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</tagMapping>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler"/>
</handlers>
</system.webServer>
</configuration>
Wish the above can help you.

Hi JC,

Had the same error and found that it was because I had not replaced the AjaxControlToolkit.dll in my application with the new one in the SampleWebsite/bin folder when I updated my AJAX version from beta to AJAX 1.0 RC. Recommend you try this.

Kind regards,

Mick

Asp.Net Ajax Enabled Web Site running very slow

I have developed my web application on ASP.NET 2.0 AJAX Extensions 1.0 . But it is running very slow.Please help me how to improve perfomance of asp.net ajax extension web site.

The most common cause for this would be that you're making too many requests to the server... i.e. you're doing lots of AJAX requests in the background and they're updating too much at once.

The performance difference between an ordinary page, for example a search box that then displays search results, should be negligable between AJAX and post-back versions - so you can't always blame the AJAX for any speed issue.

An example of AJAX slowing things down would be if you have a page with 100 Labels and each time you made an AJAX request, it had to update them all (even though only one had changed) - it would be the equivalent of building the whole page again as opposed to making an AJAX request to change just one bit of the page.

Hope this helps.

ASP.Net AJAX Enabled Web Application template missing

I have installed ASP.NET2.0 AJAX Extensions 1.0 but I cannot find a template for the above when I try to create a new project and I believe there is one available from another post? If I try a new website, I get the AJAX enabled web site template, but what I really need is the web application template.

Anyone have any ideas as to why it is not appearing? Or what settings do I need to migrate from a ajax enabled website to a web application project to enable ajax?

Thanks in advance

Hi,

Thank you for your post!

As far as I know, there is none web application project template and AJAX web application project template in Visual Studio 2005/2008.

And we can take a website as a web application project.

If you really need a solution for a web site, you can add an empty solution, then add website to it,and other related project(e.g. class library project).

If you have further questions, let me know.

Best Regards,

Asp.net Ajax Enabled web app creating more ScriptResource.axd on a Simple page

Hello,

I am using Asp.net Ajax extension 1.0.In my application ,I am using a index.aspx page,which have no script manager control.When i am runing this application the the index page is loading very slow.When I save the page from browser I am finding six ScriptResource.axd files are loading on client side.Which have up to 400 kb.So I want to reduce these files on index page.But I do not know how I do it.Please help me.

Regards,

Pawan

Hi Pawan,

Basically, those scripts won't be requested if there is no AJAX related controls on the form.
If you are using MasterPage and there is ScriptManager on it, they will be downloaded too.

Hope this helps.

Hello Raymond Wen,

Thanks for reply.

I am using asp.net ajax enable website1.0.I have noticed that ScriptResource.axd is uploaded each time when I am navigate the site.On each page ScriptResource.axd is again loading.I want to cache ScriptResource.axd on Client Side.If you have any idea about it then please help me. Thanks & Regards, Pawan


Please try the following:

1. Set debug to false in web.config

2. Set ScriptMode property of the ScriptManager to release


These should be cached on the client as long as you have <Compilation Debug="false" /> in your web.config.

ASP.NET Ajax doesnt work after 7/10/2007 windows updates

I have customers that have reported this morning that our web application that uses asp.net ajax is not longer working correctly after they installed the windows updates last night (7/10/2007). The problems that we are seeing is a page that has a gridview inside of an update panel displays some of the markup of the page. When they click the button that should trigger the update panel, the page does a full postback instead of a partial. The Update Progress doesn't show like it should either. After the postback, it may or may not show the page correctly, but none of the buttons work anymore. We found that this is only a problem with IIS 6.

If anyone knows what update may cause this so we can uninstall that update to get our customers site back up and running please let me know. I searched the forum, but couldn't find any similar problems. Are there others that are seeing similar problems with the windows updates?

Hi buckeyes,

Has your problem been resolved yet? If yes, Sharing your work will be greatly appreciated.


We haven't found a solution yet other than rolling back the updates.


Hi buckeyes,

buckeyes:

We haven't found a solution yet other than rolling back the updates.

Would you please tell us which update causes the issue and your system environments? We will check it and thanks for your feedback.


Sorry that I haven't gotten back to you on this. We had a member of the IIS team looking into this as well and so we were waiting for their reply. Anyway they were able to point us in the right direction. The problem was caused by some of our JavaScript after the install of KB928365. We were referring to controls like:

document.getElementById('ct100_MyTextBox')

We changed that to

document.getElementById('<%=MyTextBox.ClientID%>')

That has fixed our problems.

ASP.NET AJAX Deployment error

i,

I`ve done an ASP.NET AJAXwebsite and it works perfectly on my development machine. Ok! But whenI try to deploy my application on a webfarm scenario my website doesn`twork properly.
It comes out with the following error message sometimes:

"
Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causesfor this error are when the response is modified by calls toResponse.Write(), response filters, HttpModules, or server trace isenabled.

Details: Error parsing near '

<!DOCTYPE html P'.
"

Thisproblem occurs randomly. Apparently, it`s due to the load balanceconfiguration on our web servers. I think when the request goes toanother machine my website crashes.

Any hint would be very appreciated. :]

You may want to check this out

http://www.rosshawkins.net/rfh/articles/webresource.axd.html

Let me know if this helps.

Monday, March 26, 2012

ASP.NET Ajax Control Toolkit - Firewall blocking TabContainer

Hey there,

First thing's first - if this is posted in the wrong forum, I apologize. Next...

I've got an ASP.NET AJAX application developed with VS 2008 Beta 2, using the 3.5 version of the Ajax Control Toolkit - when deploying it to our web server, something interesting happens. If I access the site through a machine on the same network as the web server, it renders fine. However, if I access it from another network, or through the internet, the TabContainer is not rendering.

I checked out the reason why, and it appears that our firewall is blocking the client's ability to download the WebResource.axd file associates with the Ajax Control Toolkit - what else is interesting is that I'm also using FreeTexBox on this page (which downloads a seperate WebResource.axd file, and can access it without any problem).

If anyone has any suggestions, or has run into this problem in the past, please let me know. Thank you!

Anthony

32 views and no responses?

Wow...either I didn't explain it well enough, or nobody's run in to this.

Can anyone let me know which is the case?

Thanks.


Well, if you want comments, here is mine.. I always read anything related to the tabs since I use them a lot...

But sorry, never run into this, works fine on my laptop and the corporate machines (that have high security)... And firefox, ie 6-7...

- Have you tried with another machine, that is not on same network as webserver + where you can test different firewalls/settings?

- Also, are you sure the tabs are to blame? Is everything on your web app from the same domain?

It could be so many different things...Tongue Tied


Yeah I had a similar issue. We use an Aventail product (now SonicWall I believe) to allow users to login securely to our network over the net. It was configured in a way that was stopping that WebResource.axd file from being downloaded.

It seems that the issue is with your firewall. If it is blocking the file then there is little you can do. We configure our firewall\Aventail product to be a little less stringent so that the file is now downloaded and the asp.net ajax apps work fairly well. There are still other issues.

So I think you need to talk to your Network Admin people...?


Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan


Jonathan Shen – MSFT:

Hi Anthony,

Why not use a debugging tool such as Web Development Helper,Fiddler and Firebug(used on Firefox) etc? They will help you on detecting all the downloaded items.

Best regards,

Jonathan

Thanks for the suggestion - that's the point of my query, however. I do in fact know that the file is not being downloaded, I'm just trying to determine what changed between the AJAX Toolkit for VS2005 and the toolkit that's compatible with 3.5 (VS 2008) that's causing it to be filtered by our firewall. It seems odd to me that it would work with a prior release, yet not with the new version.


After some more debugging, I think I may have determined the reason why the ScriptResource.axd files are not being downloaded - it appears that they are using a Content-Type of application/javascript, where WebResource.axd (downloaded without any problems) uses Content-Type application/x-javascript.

Additionally, I checked older projects built on VS 2005 .NET 3.0, and the ScriptResource.axd files there use Content-Type text/javascript.

So the question then becomes: Why in the world was the Content-Type changed to something which isn't successfully downloading?

Thoughts?


Alright, for anyone who searches this post in the future, here's the solution that we just implemented and tested:

First of all, we checked the content type of the files that weren't coming through to the client when it was posted to the web using Fiddler2 (http://www.fiddlertool.com/fiddler/).

When we checked the remote site, Fiddler showed that the files were forbidden. I checked it through localhost to see that the Content-Type was application/javascript.

Then, we checked our firewall. We had both application/x-javascript, and text/javascript, but no application/javascript!

We updated the configuration file for the firewall to include application/javascript content-types, uploaded it, and tested the site again - Voila, the Ajax Control Toolkit now works with Visual Studio 2008 and the 3.5 framework.

Thanks everyone for their help with this, much appreciated.

ASP.Net Ajax compatibility

I need to write an application running on the internet. So I suggested to write it using ASP.net Ajax. But I need to know how is the compatibility of ASP.Net Ajax with other browsers and different versions?Which resources works on a specific browser and which doesn't work.Basically, I need my application working on IE 5+. Will Ajax run on this scenario?Ajax is built on pieces that are available in most recent browsers. I'm pretty sure IE 5.0 is included in the list. If you use Atlas, which is the ASP.Net implementation of programming with Ajax, you'll get browser compatability and their list of supported browsers should be availablehere.

ASP.NET AJAX Autocomplete with VB

Finally I got this to work with VB -

My first step was to get the example ajax application working: http://ajax.asp.net/default.aspx?tabid=47&subtabid=471

Of course there is no VB example - So I converted the C example to VB - which was pretty easy since I only needed the autocomplete and none of the other examples.

The only way I could get the autocomplete to work was to have the webservice written in C instead of VB. Everything I checked shows the VB and C# web services as identical.

So... does autocomplete not work with VB webservices?

This works for me

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Autocomplete
Inherits System.Web.Services.WebService
Private Shared autoCompleteWordList As String()

<WebMethod()> _
Public Function GetWordList(ByVal prefixText As String, ByVal count As Integer) As String()

If (autoCompleteWordList Is Nothing) Then
Dim temp() As String = IO.File.ReadAllLines(Server.MapPath("~/App_Data/words.txt"))
Array.Sort(temp, New CaseInsensitiveComparer)
autoCompleteWordList = temp
End If
Dim index As Integer = Array.BinarySearch(autoCompleteWordList, prefixText, New CaseInsensitiveComparer)
If (index < 0) Then
index = Not index
End If
Dim matchingCount As Integer
matchingCount = 0
Do While ((matchingCount < count) _
AndAlso (index _
+ (matchingCount < autoCompleteWordList.Length)))
If Not autoCompleteWordList((index + matchingCount)).StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) Then
'TODO: Warning!!! break;If
End If
matchingCount = (matchingCount + 1)
Loop
Dim returnValue() As String = New String((matchingCount) - 1) {}
If (matchingCount > 0) Then
Array.Copy(autoCompleteWordList, index, returnValue, 0, matchingCount)
End If
Return returnValue
End Function
End Class

<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server">
</atlas:ScriptManager>
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:TextBox ID="TextBox1" runat="server" Width="1010px"></asp:TextBox>
<atlas:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server">
<atlas:AutoCompleteProperties TargetControlID="TextBox1" Enabled="True" ServicePath="AutoComplete.asmx"
ServiceMethod="GetWordList" MinimumPrefixLength="1" />
</atlas:AutoCompleteExtender>
</div>
</form>


I am using your code to solve a problem that I am having.

I need modify it a bit to work with a database.

Can you help me out with this?

Thanks


Im trying this method the vb is good. i downloada words.txt that help.

but i try to run it on my website and is not working other ajax enable work like the passwordstrengt.


I presume you can do the lookup straight from SQL server rather than use a web service?

Did you get any replies as this is exactly what I would like to do.

cheers

Mike


Hi,

i install the AjaxControlToolkit, but AutoComplete doesn't want to work.

I search the web and find samples with the microsoft atlas dll.

I managed to use this dll and AutoComplete works fine.

Microsoft.web.atlas.dll and AjaxControlToolkit.dll seem not to work on the same page.

How can I solve my problem (make work AutoComplete Control) only using AjaxControlToolkit.dll.

Here, you can download my simple code to test: http://promesses.planet-work.com/fic/ajax.zip

Thank for your help


Here is some code that I wrote up to work with a database. It's in VB.NET for all those VB heads out there. Hopefully this will help all of you.

<%@.WebServiceLanguage="VB"Class="PartnerList" %>

Imports

System.Web

Imports

System.Web.Services

Imports

System.Web.Services.Protocols

Imports

System.Collections.Generic

Imports

System.Data

Imports

System.Data.SqlClient

Imports

System.Configuration

<System.Web.Script.Services.ScriptService()> _

<WebService(Namespace:=

"http://www.commpartners.us/webservices", Description:="Webservice to allow a autocompleter service lookup")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

Public

Class PartnerListInherits System.Web.Services.WebService

<WebMethod(Description:=

"Method to retrieve Partner List")> _PublicFunction GetPartnerList(ByVal prefixTextAsString,ByVal countAsInteger)As ArrayDim SqlConnection1AsNew SqlConnection(ConfigurationManager.AppSettings("ConnectionString"))Dim SqlCommand1AsNew SqlCommand("SELECT DISTINCT TOP(@.nrows) (COMP + ':' + NAME) As PartnerName From dbo.WhiteList WHERE Name Like @.term", SqlConnection1)

SqlCommand1.Parameters.AddWithValue(

"nrows", count)

SqlCommand1.Parameters.AddWithValue(

"term", prefixText &"%")Dim suggestionsAsNew List(OfString)

SqlConnection1.Open()

Dim drAs SqlDataReader = SqlCommand1.ExecuteReader(CommandBehavior.CloseConnection)

While dr.Read

suggestions.Add(dr(0).ToString)

EndWhile

Return suggestions.ToArray

EndFunction

End

Class

And for the front facing code:<asp:TextBoxID="SearchPartner"runat="server"Width="216px"></asp:TextBox>
<asp:ButtonID="FindBtn"runat="server"OnClick="FindPartner"Text="Find"/>
<ajaxToolkit:AutoCompleteExtenderID="AutoCompleteSearch"MinimumPrefixLength="1"CompletionInterval="300"CompletionSetCount="10"runat="server"TargetControlID="SearchPartner" ServicePath="PartnerList.asmx"ServiceMethod="GetPartnerList"/
Also if you are wondering why my SQL query has (COMP + ':' + NAME) it's so I can show both an ID and concat it with the Company Name.

Have fun with the code and let me know if you have any problems.

JoeWeb


Nobody can help me ?

HI,

Sorry for my loging to our discussion , but i face the same problem with the autocompleteExtender that does not work with my VB.net project where the all other Controltookit work fine,..

i do the same steps which u wrote here but until know nothing happend and none of my code execute ,..........


JoeWeb:

Here is some code that I wrote up to work with a database. It's in VB.NET for all those VB heads out there. Hopefully this will help all of you.

<%@.WebServiceLanguage="VB"Class="PartnerList" %>

Imports

System.Web

Imports

System.Web.Services

Imports

System.Web.Services.Protocols

Imports

System.Collections.Generic

Imports

System.Data

Imports

System.Data.SqlClient

Imports

System.Configuration

<System.Web.Script.Services.ScriptService()> _

<WebService(Namespace:=

"http://www.commpartners.us/webservices", Description:="Webservice to allow a autocompleter service lookup")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

Public

Class PartnerListInherits System.Web.Services.WebService

<WebMethod(Description:=

"Method to retrieve Partner List")> _PublicFunction GetPartnerList(ByVal prefixTextAsString,ByVal countAsInteger)As ArrayDim SqlConnection1AsNew SqlConnection(ConfigurationManager.AppSettings("ConnectionString"))Dim SqlCommand1AsNew SqlCommand("SELECT DISTINCT TOP(@.nrows) (COMP + ':' + NAME) As PartnerName From dbo.WhiteList WHERE Name Like @.term", SqlConnection1)

SqlCommand1.Parameters.AddWithValue(

"nrows", count)

SqlCommand1.Parameters.AddWithValue(

"term", prefixText &"%")Dim suggestionsAsNew List(OfString)

SqlConnection1.Open()

Dim drAs SqlDataReader = SqlCommand1.ExecuteReader(CommandBehavior.CloseConnection)

While dr.Read

suggestions.Add(dr(0).ToString)

EndWhile

Return suggestions.ToArray

EndFunction

End

Class

And for the front facing code:<asp:TextBoxID="SearchPartner"runat="server"Width="216px"></asp:TextBox>
<asp:ButtonID="FindBtn"runat="server"OnClick="FindPartner"Text="Find"/>
<ajaxToolkit:AutoCompleteExtenderID="AutoCompleteSearch"MinimumPrefixLength="1"CompletionInterval="300"CompletionSetCount="10"runat="server"TargetControlID="SearchPartner" ServicePath="PartnerList.asmx"ServiceMethod="GetPartnerList"/
Also if you are wondering why my SQL query has (COMP + ':' + NAME) it's so I can show both an ID and concat it with the Company Name.

Have fun with the code and let me know if you have any problems.

JoeWeb

Did any of you read my post? This code works and I have tested it... COPY and Paste it and let me know how that works!

JoeWeb


DearJoeWeb

we do what exactly u do in the examle above , but nothing happened,..... so what is your suggession


DearJoeWeb

we do what exactly u do in the examle above , but nothing happened,..... so what is your suggession


I ame having the same problem where the autocomplete is not working.

When I try and run the code locally, which is running IE 6, I get a javascript error 'Sys.Debug is null or not an object', but I do not get a notification when running the page remotly on IE7.

The webservice is working when I go to the .asmx page locally.

Am I missing something? Do I need to register the web service somewhere?Help!!!


hi all

I had the same problem with the posted code how ever have solved it. You basically need to add the following to the page:

<asp:ScriptManager ID="ScriptManager1" runat="server" > <Services> <asp:ServiceReference Path="AutoComplete.asmx" /> </Services> </asp:ScriptManager>

I also changed the SqlConnection slightly as the method in the code above did not work:

Dim SqlConnection1As SqlConnection =New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("BVDB").ConnectionString)

hope this helps...

For me it works fine with MSSQL for tags. So I work with splitting Text by the last comma, if you do not need this, simply amend the code.

on aspx I have Script manager and

asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<

asp:TextBoxID="test1"runat="server"></asp:TextBox>

<

cc1:AutoCompleteExtenderID="AutoCompleteExtender1"runat="server"TargetControlID="test1"ServiceMethod="GetTags"ServicePath="UsedTags.asmx"MinimumPrefixLength="2"CompletionInterval="1000"EnableCaching="true"CompletionSetCount="12">

then UsedTags.asmx looks like

<%

@.WebServiceLanguage="VB"CodeBehind="~/App_Code/UsedTags.vb"Class="UsedTags" %>

then App_Code/UsedTags.vb looks like

Option Explicit On
Option Strict On
Option Compare Binary

Imports System.Data
Imports System.Data.SqlClient

Imports System.Collections.Generic

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<System.Web.Script.Services.ScriptService()> _
Public Class UsedTags
Inherits System.Web.Services.WebService

Private Shared autoCompleteWordList As String()

<WebMethod()> _
<System.Web.Script.Services.ScriptMethod()> _
Public Function GetTags(ByVal prefixText As String, ByVal count As Integer) As String()

Dim LastWord As String, _
ExpressionStart As String
If prefixText.Contains(",") AndAlso prefixText.LastIndexOf(",") < prefixText.Length Then
LastWord = prefixText.Substring(prefixText.LastIndexOf(",") + 1)
ExpressionStart = prefixText.Substring(0, prefixText.LastIndexOf(",") + 1)
Else
LastWord = prefixText
ExpressionStart = String.Empty
End If

Dim suggestions As New List(Of String)

If LastWord.Length > 0 Then
Dim connectionString As String
Using mySqlDbConnection As New SqlClient.SqlConnection()
connectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString

Dim mySqlDbCommand As New SqlClient.SqlCommand()
mySqlDbConnection.ConnectionString = connectionString
mySqlDbCommand.Connection = mySqlDbConnection
mySqlDbCommand.CommandType = CommandType.Text
mySqlDbCommand.CommandTimeout = 60
mySqlDbConnection.Open()

mySqlDbCommand.CommandText = "SELECT DISTINCT TOP(@.nrows) myTag FROM dbo.Tags WHERE myTag LIKE @.term ORDER BY myTag"
mySqlDbCommand.Parameters.AddWithValue("nrows", count)
mySqlDbCommand.Parameters.AddWithValue("term", LastWord & "%")

Dim ReaderData As SqlClient.SqlDataReader
ReaderData = mySqlDbCommand.ExecuteReader()

Do While ReaderData.Read
suggestions.Add(ExpressionStart & ReaderData(0).ToString)
Loop

ReaderData.Close()
mySqlDbConnection.Close()
End Using
End If

Return suggestions.ToArray
End Function
End Class

ASP.net AJAX and precompilation

I often will precompile an application so that I can get better performance on my production servers. However when I mix it with AJAX, it goes bad.

I run from a VS.net Command Window:

aspnet_compiler -p "C:\documents and settings\mandreko\my documents\visual studio 2005\websites\ajax_maillist" -v /maillist c:\maillist

I then copy the c:\maillist to my websiteroot/maillist and get this error:

Server Error in '/maillist' Application.

Object reference not set to an instance of an object.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details:System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of thecurrent web request. Information regarding the origin and location ofthe exception can be identified using the exception stack trace below.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods) +368
System.Web.Script.Services.PageClientProxyGenerator.GetClientProxyScript(HttpContext context, IPage page, Boolean debug) +46
System.Web.UI.ScriptManager.RegisterServices() +748
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +242
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2012740
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1566

If I run the non-precompiled version of the code, it works perfectly on my production server, however when trying to precompile it, it causes this. Any ideas on this? Are they not compatible? Am I missing something?

Hi,

I'm still learning about AJAX, but it could be that your problem is do to the way caching is handled in each instance. Perhaps the precompiled version is using cached data, while the on-demand model is getting fresh data. I do know that caching is a concern for AJAX enabled applications, and that just turning cahing off is not a workable solution.

For a pretty good run down on how the two development models (Websites, and Web Application Projects), handle compilation, take a look at this learning video from the Learn tab here at asp.net:http://asp.net/learn/videos/view.aspx?tabid=63&id=16 This vid covers the WAP add-in (which is no longer needed as an add in after you do the VS 2005 SP1 install). Towards the end there's a good slide showing compilation choices and paths.

Hope it helps BRN..


Actually after searching some more, I found it. Looks like it's a known problem:

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

At least now I know I'm not crazy.


Hi,

Glad you found out what was causing the issue - hope the thread provided a solution or work around. BTW, did you do the VS 2005 SP1 install yet? I was wondering if that would address the problem you ran across.

So, you think one problem explained proves you're not crazy? Hummm. Let's hope your right! As an admitted lunatic, I wouldn't worry about it in any event. BRN..


VS 2005 SP1 didn't fix anything unfortunately. I did have that.

It matches my problem description, and even got ScottGu posting about it, so I'm confident they'll have it fixed in the next release.

ASP.NET Ajax and Google Maps API

Hi all,

I have developed the web application for displaying the maps inASP.NET using Atlas and Google Maps API. The map is working fine there. Now, I have to migrate the Atlas web application toASP.NET Ajax. Migration has been performed successfully and code is building without errors. While running, Web Service isn't called. I am calling the web service method from Javascript. In another test application (without Google Maps API), I have called the web method from Javascript. Is there any problem due to Google Maps API. Apparently, it seems fine. If any one know about this issue, please let me know.

Thanks in advance.
Best Regards

Webservices now have to be flagged with the [ScriptService] attribute in order to be used, have you made that change?


Yes, I have made that change. In the script manager tags, now js file needs to be mentioned. I also mention that using script reference tag.

I have a problem adding points to a yahoo map with a webservice using asp.net ajax as well. It seems like the oncomplete event is not being "waited for" and I am trying to plot to an array that has no contents. If i trigger the event a second later after i have my webservice response it works fine :) try doing alert() to check to see if something is being received..In my case my x coordinate array wasnt populated by the time i got to my addmarker event linked to a button click but my ycoor and name of the point were populated. I have resorted to making the web service call on load but it is definitely not a best practice scenario.

-Scott

ASP.NET AJAX 1.0, works but NOT works.

I recently upgraded an application to AJAX 1.0 which was using ATLAS. But the AJAX parts in the application is no more supporting AJAX functionality. Infact, there is NO error (server or client side, javascript) but simply, changing any control causes post back and refresh the whole page instead of refreshing the part of the page. I created a new page in that application (very simple) and tried updated panel there, but that is also not working.

I tried the guide to move from ATLAS to AJAX and ensured the checklist provided in that, and I did 100% same things. My web.config includes ALL required configuration and setting. Here is the code I am using on ASPX page.


<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

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

<ContentTemplate>

<asp:DropDownListID="ddlMain"runat="server"AutoPostBack="true">

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

<asp:ListItemText="First Item"></asp:ListItem>

</asp:DropDownList>

<br/>

</ContentTemplate>

</asp:UpdatePanel>

Does someone have any idea what is going on? Please note that there is no Javascript error on the page:

thanks,

Sameers

the updatepanel and other controls must inside the script manager.


Sathesh_pandian:

the updatepanel and other controls must inside the script manager.

no controls have to be inside the script manager actually, it just has to be present on the page.

But you should make the ddl tag like this

<asp:DropDownListID="ddlMain"runat="server">

i dont think you want autopostback set to true

You are true that things must not be inside script manager. However, in order to make drop down list raise events, its autopostback property should be set to true. otherwise it dont work. I have tried it many times in other applications.

thanks,

Sameers


that is not the only way to raise events. you want to do an asycronous postback in your case, so the whole page does not reload. if you set updatemode for the panel to condition you can always say childrenastriggers = true, or do something like this where you define the triggers specifically. Autopostback will do full post backs and you probably dont want that

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="ddlMain" EventName="SelectedIndexChanged" /> </Triggers> <ContentTemplate> <asp:DropDownList ID="ddlMain" runat="server"> <asp:ListItem Text="First Item"></asp:ListItem> <asp:ListItem Text="Second Item"></asp:ListItem> <asp:ListItem Text="Third Item"></asp:ListItem> <asp:ListItem Text="First Item"></asp:ListItem> <asp:ListItem Text="First Item"></asp:ListItem> <asp:ListItem Text="First Item"></asp:ListItem> <asp:ListItem Text="First Item"></asp:ListItem> </asp:DropDownList>

Thanks for this suggestion, I already have tried it and its not working even in conditional or always mode. I think there is something to do with configuration settings (web.config), there are a lot of components used in the application. So there are a lot of entries in web.config. I am going to try to remove them one by one and try on what will help. I will post back with my results.

thanks,

Sameers


Ah! I got it.

It was the web.config entry

<xhtmlConformance mode="Legacy"/>

Which was causing trouble. I removed it and now everything is working fine.

Maybe, the following link is helpful for more information about the xhtmlConformance

http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

Thank you all guys for your suggestions.

Sameers


Just for other people who may stumble across this thread later, AutoPostback="true"will work fine in an UpdatePanel and do an asynchronous postback.

Asp.Net Ajax 1.0 goes odd with MapXtreme 2005 6.6

I put a scriptmanager and updatepanel in my web gis application base on MapXtreme 2005 6.6; everytime I click the contols in the updatepanel the web browser will refresh the whole web page which is odd for Asp.Net Ajax 1.0.

Then I put the same scriptmanager and updatepanel and my own controls into another web page without MapXtreme 2005 6.6, it goes exactly the way I want. But I wonder Asp.Net Ajax 1.0 FrameWork should work right in every asp.net web page with any web controls outside the updatepanels

Have you create AJAX Enabled Web Site...

Check the property of ScriptManager EnablePartialRendering="true" and for UpdatePanel UpdateMode="Conditional"

Saturday, March 24, 2012

ASP.Net AJAX - Cannot Set focus to a TextBox inside an Update Panel

Hi; I am using the released version of AJAX Controls and I am working on a Web Application with a Masterpage.
What I would like to do is, I have two Radiobuttons and two TextBoxes inside an update panel; When the user clicks the RadioButton1, I would like to set the focus to TextBox1 and if the user clicks the RadioButton2, I would like to set the focus to the TextBox2. I have googled for it and found couple of similar solutions that works with the beta AJAX assembly "Microsoft.Web.Atlas" but it doesn't work with the ASP.Net AJAX which I am using in my current project.

The following code works just fine when I use theMicrosoft.Web.Atlas soplease let me know if anyone knows a solution that works with the released version of AJAX Controls; Thanks in advance.

//***************************************************************************************

//Code behindprotected void RadioButton1_CheckedChanged(object sender, EventArgs e) { SetMyFocus(ref TextBox1); TextBox1.Focus(); }private void SetMyFocus(ref TextBox txtBox) {string focusString ="setTimeout(\"$('" + txtBox.ClientID + "').focus(); \", 100);"; ClientScript.RegisterStartupScript(this.GetType(),"focusString", focusString,true); }protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { SetMyFocus(ref TextBox2); TextBox2.Focus(); }

//***************************************************************************************
 The following code is from the source view of the page
 
<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/Test.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" Title="Untitled Page" %><%@dotnet.itags.org. Register Assembly="Microsoft.Web.Atlas" Namespace="Microsoft.Web.UI" TagPrefix="cc1" %><asp:Content ID="Content1" ContentPlaceHolderID="CPHTest" Runat="Server"> <cc1:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true"> </cc1:ScriptManager> <cc1:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="True" OnCheckedChanged="RadioButton1_CheckedChanged" GroupName="Group1" /><br /> <asp:RadioButton ID="RadioButton2" runat="server" AutoPostBack="True" GroupName="Group1" OnCheckedChanged="RadioButton2_CheckedChanged" /><br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br /> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />   </ContentTemplate> </cc1:UpdatePanel></asp:Content>

Hi,

I am using the new SetFocus method of the ScriptManager class.

Example:

ScriptManager1.SetFocus(TextBox2);

I works with the last release of Microsoft AJAX.

Hope this helps,

David


Wow; that works great; Thanks for the quick reply.

Jacob


I am using the Atlas beta version. I am having the same textbox focus problem. I tried to use the setFocus(), but i couldnt find the setFocus() of the scriptmanager.

Where to use

ScriptManager1.SetFocus(TextBox2);

I just have the

ScriptManager1.Focus() method. please help.

Thanks in Advance


Use the latest version of ASP.NET AJAX


Thanks lot

I also having same prob and search the web for solution. This is tha only place that I found a resolution.

Thanks lot again

asp.net 2.0 ajax website menucontrol : javascript error :"Microsoft JScript runtime error:

i m developing application using ajax in asp.net 2.0 . I m using menu control of asp.net,multiview and view control.while running this application i got error "Microsoft JScript runtime error: '0.cells' is null or not an object" so now what is the solution of this i have returend following coad in html

<

div>

<

asp:UpdatePanelID="UpdatePanel2"UpdateMode="Conditional"runat="Server"><ContentTemplate>

<tablecellpadding="0"cellspacing="0"border="0"width="100%"><tr><tdwidth="6%"><asp:MenuID="Menu1"runat="server"DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson"dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False"OnMenuItemClick="menu_click"Orientation="Horizontal"><Items><asp:MenuItemText="Operator"Value="0"></asp:MenuItem><asp:MenuItemText="Visitor"Value="1"></asp:MenuItem></Items><StaticMenuStyleBackColor="White"/><StaticMenuItemStyleBackColor="White"/><StaticSelectedStyleBackColor="#FFC080"/><StaticHoverStyleBackColor="#80FFFF"/></asp:Menu><asp:MultiViewID="MultiView1"runat="server"><asp:ViewID="op"runat="server"><tablewidth="30%"><trvalign="top"><td>hetal</td></tr></table></asp:View><asp:ViewID="visitor"runat="server"><tablewidth="30%"><trvalign="top"><td>tarun</td></tr></table></asp:View></asp:MultiView></td>

</tr>

</table>

</ContentTemplate>

</

asp:UpdatePanel>

</

div>

please give me solution for this error...thank u

<asp:menu > control seems to be not compatible withUpdatepanel. Put the menu control outside the updatepanel. If you wantto refresh only updatepanel contents on click of menu control, then setmenu control as an async postback trigger for updae panel as givenbelow.

try following modified code.

<div>
<asp:Menu ID="Menu1"runat="server" DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson" dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False" OnMenuItemClick="menu_click"Orientation="Horizontal">
<Items>
<asp:MenuItem Text="Operator" Value="0" ></asp:MenuItem>
<asp:MenuItem Text="Visitor" Value="1"></asp:MenuItem>
</Items>
<StaticMenuStyle BackColor="White" />
<StaticMenuItemStyle BackColor="White" />
<StaticSelectedStyle BackColor="#FFC080" />
<StaticHoverStyle BackColor="#80FFFF" />
</asp:Menu>
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="6%">
<asp:MultiView ID="MultiView1" runat="server" >
<asp:View ID="op" runat="server">
<table width="30%">
<tr valign="top"><td>hetal</td></tr>
</table>
</asp:View>
<asp:View ID="visitor" runat="server">
<table width="30%">
<tr valign="top"><td>tarun</td></tr>
</table>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Menu1"EventName="MenuItemClick" />
</Triggers>
</asp:UpdatePanel>

</div>


You can also add the below script to your aspx page. It overrides the AJAX function and takes care of the error. This works for problems with Tab Controls too, seehttp://forums.asp.net/thread/1628780.aspx.

<scripttype="text/javascript">

var oldMenu_HideItems = Menu_HideItems;if(oldMenu_HideItems)

{

Menu_HideItems =

function(items)

{

if (!items || ((typeof(items.tagName) =="undefined") && (itemsinstanceof Event)))

{

items = __rootMenuItem;

}

if(items && items.rows && items.rows.length == 0)

{

items.insertRow(0);

}

return oldMenu_HideItems(items);

}

}

</script>

ASP.Net 2.0 - Page Trace and Update Panel

I am just getting started with AJAX.

I have a .Net 2.0 application with page/debug trace set to true. I have a simple page listed below. When I click the button with the page/debug trace set to true, I get an error message basically saying that trace has to be false.

Does this mean that I have to always have the page/debug trace set to true for the AJAX to work?

<asp:LabelID="Label1"runat="server"Text="Label"Width="249px"></asp:Label><br/>

<br/>

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

<ContentTemplate>

<hr/>

<asp:LabelID="Label2"runat="server"Text="Label"Width="249px"></asp:Label>

<hr/>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="Button1"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

<br/>

<asp:LabelID="Label3"runat="server"Text="Label"Width="249px"></asp:Label><br/>

<br/>

<asp:ButtonID="Button1"runat="server"Text="Button"Width="233px"/></div>

Actually, I mean does page/debug trace always have to be set to FALSE for me to be able to use AJAX?

Hi,

Yes, you can't enable trace on page for asynchronous request. That's because the response must conform to a specified format, otherwise, it will fail.


Tracing doesn't work in the UpdatePanel, it'sbasically equal to using Response.Write which is also a no-no.

-Damien

asp.net 1.1 , how to do use tab control in asp.net 1.1

AJAX provides following functionality to website, and I want to make something like this in my application. I m using asp.net 1.1 How can I do this.

Please click following link and see demo how AJAX does ( you will get it what I mean by, thank you)

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Tabs/Tabs.aspx

I want to make something like above like deom , how can I do that using asp.net 1.1

thank you in advance

maxmax

It is possible but there is not a simple solution. The more simple solution would be to convert your site to the 2.0 framework. If that is not possible, then just google "ajax with .net 1.1" there are lots of articles out there.

ASP.NET / AJAX - FILE UPLOAD

Hi,

I am trying to build a web based application using asp.net and i need to have a file upload that will upload somehow in the in the background and report to the asp.net page once uploaded.

i tried one example for an ajax/webservice upload but it required interaction of an activex object that required browset setting changes that would not be suitable for the target installation for the customer.

is it possible to do a succesful 'background' upload using asp.net and ajax?

thanks in advance!

regards,

kq2

Yes it is, you can see it working here:http://www.telerik.com/products/aspnet/controls/upload/overview.aspx


Hi,

Thanks for your reply.

Anyone got any way of doing the upload without buying someone else's existing component?

Thanks again.


Hi, kitquo2

An Ajax Alternative for FileUpload!!!!

We've all embraced Ajax as a revolutionary technology, but many of us forget (or are not aware) of asynchronous posts in the times before XmlHttp requests. Our good old friend the IFrame used to be the preferred option for asynchronous http communications. Because an iframe is in essence it's own browser window, it can be used to fire off asynchronous requests (both POST and GET). However, even more important is an IFrame's ability to be a 'target' of a form POST. By adding an IFrame to the page and setting it as the target of the form post, you can in essence create an asynchronous file transfer.

For more help about Ajax Alternative for FileUpload, Please check: http://blogs.infragistics.com/blogs/tony_lombardo/archive/2007/04/09/file-uploads-where-s-the-ajax.aspx

You can also see this thread for more help:http://forums.asp.net/t/1117746.aspx There is a demo in my reply to that thread.

Let me know if you need more info.

If this help you,don't forget mark it as a answer.Thanks!