.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Replacement of XmlhttpRequest in ASP .NET 3.5

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :ASP.Net


We have used XMLhttpRequest object for ajax request in our ASP .NET 2.0 project. Now we have migrated this project to ASP .NET 3.5. What features (updatepanel/scriptmanager) can we use of 3.5 in place of XMLhttpRequest object?
How it will affect in performance?



View Complete Post

More Related Resource Links

Replacement options for Membership


Hi everyone,
     I tried to use Microsoft's Membership option for signing up new users and authenticating them on subsequent pages, but it has not worked very well. The biggest issue has been with the REMEMBER ME function. With this checked, I am randomly logged out in the middle of some functions and some pages always show me as not authenticated, while others properly show me as authenticated. I built a site based on VB.
I was wondering what other people are using ro register users and monitor authentication and also if anyone has had better experiences with other solutions. 

Hi everyone,

     I tried to use Microsoft's Membership option for signing up new users and authenticating them on subsequent pages, but it has not worked very well. The biggest issue has been with the REMEMBER ME function. With this checked, I am randomly logged out in the middle of some functions and some pages always show me as not authenti

Web deployment project - web.config section replacement does not add remove tag


I have a web application that is actually installed as a component of a third party site.  In some configurations, I need to remove certain connection strings and re-add them.  I'm replacing this web.config section with a xml file that includes the following:

      <remove name="MyOverridenConnection"/>
      <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection"

For some reason the remove tag is left out during the substitution and I end up with the following in the installed config:

      <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection"

Is there any way to issue removes in replaced sec

Find and replacement SSIS Custom component issues

Hi All, I developed one custom component in SSIS  Find and Replacement I register the dll and copy and paste in to Pipleline component. but it's not visible in the Toolbox while choose Items Please suggest why it's not comming.. using   System; using   System.Collections.Generic; using   System.Linq; using   System.Text; using   Microsoft.SqlServer.Dts.Pipeline; using   Microsoft.SqlServer.Dts.Design; using   Microsoft.SqlServer.Dts.Runtime.Wrapper; using   Microsoft.SqlServer.Dts.Pipeline.Wrapper; using   System.Data.OleDb; using   System.Data.SqlClient; using   System.Windows.Forms; using   System.Runtime.InteropServices; using   System.Data; using   System.Collections; using   Microsoft.SqlServer.Dts.Runtime; using   Microsoft.SqlServer.Server; namespace   FindAndReplace { [ ComVisible(true)] [ DtsPipelineComponent ( DisplayName = "Find and Replace", Description = "Finding Find and replace", IconResource = "Microsoft.Samples.SqlServer.Dts.Find and Replace.ico", ComponentType = ComponentType.Transform )]   class FindAndReplace :PipelineComponent {   #region   ProvideComponentProperties   /// <summary>   /// </summary>   public ove

looking for CURSOR replacement

I got below solution from christa with cursor...could some one help me out without cursor solution.. here we are devloping WHERE clause... CREATE TABLE X (UID INT IDENTITY(1,1), COL_N VARCHAR(50), COL_V VARCHAR(50), COL_D VARCHAR(50)) INSERT INTO X VALUES ('S_NAME', 'AYAZ', 'VARCHAR(50)') INSERT INTO X VALUES ('S_ROLL', '10', 'DECIMAL(15, 0)') INSERT INTO X VALUES ('S_MARKS', '99', 'INT') INSERT INTO X VALUES ('S_SCHOOL', 'ZINQ', 'VARCHAR(100)') --SELECT * FROM X /*CURSOR*/ declare @n varchar(50), @v varchar(50), @d varchar(50) declare @sql varchar(max) set @sql = ' where ' declare mycur cursor for select col_N, col_V, col_D from X order by uid open mycur fetch next from mycur into @n,@v,@d while @@fetch_status = 0 begin set @sql = @sql + @n + ' = ' if @d like '%char%' set @sql = @sql + '''' + @v + '''' else set @sql = @sql + @v set @sql = @sql + ' and ' fetch next from mycur into @n,@v,@d end close mycur deallocate mycur set @sql = LEFT(@sql, len(@sql) - 4) print @sql --WHERE S_NAME = 'AYAZ' AND S_ROLL = 10 AND S_MARKS = 99 AND S_SCHOOL = 'ZINQ'

XAML Serialization replacement

I've got an app where the user lays out a windows with various information displays.  To save the layout the window is serialized using XAML Serialization vial XAMLWriter.Save. the problem is all of the controls are user controls and as XAML Writer is"self contained" it serializes all the contents of the usercontrol as well.  You end up with the control, its resources, contextmenus and component controls being serialized. Does any one know of a solution to this problem so only the XAML for the user control only? I'd role my own version of this, but don't really know the best way to do so.   any help would be appreciated.  

RunTime ControlTemplate Replacement

Hello, I would simply like to replace the ControlTemplate of a Label as shown below, and have the visual effect of this ControlTemplate replacement render in real time (during run time).  The code works, but the host panel, that which is hosting all of the labels with this ControlTemplate, needs to be re-displayed to the user.  This means the user basically has to close the tab and open it again in my application to see the effect of the ControlTemplate replacement. Here is the code: // setup and configure the resources // MemoryStream srRequiredColumnLabel = null; MemoryStream srRequiredColumnLabelFixed = null; ParserContext pc = null; string xamlRequiredColumnLabel = string.Empty; string xamlRequiredColumnLabelFixed = string.Empty; xamlRequiredColumnLabel = @"<ControlTemplate TargetType='{x:Type Label}'> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width='*'/> <ColumnDefinition Width='8'/> <ColumnDefinition Width='2'/> </Grid.ColumnDefinitions> <ContentPresenter Grid.Column='0' VerticalAlignment='Center'/> <DockPanel Grid.Column='1' VerticalAlignment='Center' HorizontalAlignment='Left'>

window.XMLHttpRequest - Is it possible to call the Method which is present on the same page?

Dear Friends, I am using the below XML HTTP Request for checking the username whether already exist or not, What i am doing is i am opeing a page on xmlhttp.open("GET", "CheckUserNameSupportiveFile.aspx?UserName=" + username, true); And passing the username to check with database. if (window.XMLHttpRequest) { // code for all new browsers xmlhttp = new XMLHttpRequest(); }if (xmlhttp != null) { xmlhttp.onreadystatechange = state_Change; var adad = username = document.getElementById('<%=txtUserName.ClientID %>').value; // alert(adad); xmlhttp.open("GET", "CheckUserNameSupportiveFile.aspx?UserName=" + username, true); xmlhttp.send(null); }but what i want to do is, IS IT POSSIBLE WITHOUT CALLING ANOTHER PAGE [CheckUserNameSupportiveFile.aspx?UserName=" + username ] Can i check it on the same page itself by calling method OR something on the same page itself.I do not want to pass the value to another page on and check it with DB, i want to do in same page itself.All your suggestion / advice are welcome.

Cannot import backup from Sharepoint 3.0 to replacement server

I want to retire a Windows 2003 Standard server (named Meton) running Sharepoint 3.0 and transfer its entire database in a transparent manner (I want it to be exactly like it is on the old server) to a 2008 R2 standard guest partitian. I have sucessfully backup up the old server using both the operations tab of the web GUI and this bat file: cd\ cd Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN stsadm -o backup -url http://meton.pond_rd.wtpsmercer.k12.nj.us -directory D:\Wholesite -backupmethod full -percentage 10 -backupthreads 3 pause Both worked. Giving credit where due both this and the import bat were derived from information on http://www.epnetworking.com/blog/?p=179. Attempting to import with the GUI produced nothing. Then I ran this bat: c: cd\ cd Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN stsadm -o restore -hostheaderwebapplicationurl http://sharepoint.pond_rd.wtpsmercer.k12.nj.us -directory C:\ -restoremethod new -username xxxxxx -password xxxxxx -newdatabaseserver sql2008 pause   Despite the information on technet that stsadm is not interactive there are a series of questions and it would not let me choice the default database name, see below. Verbose: Adding WSS_Administration to Restore list. Verbose: Adding Web Application to Restore list. Verbose: Adding SharePoint_AdminContent_c829909f-fe1e-48d8-8649

Handle XMLHttpRequest on server side


I am very new to web programming, I have a task at hand, and I need to write an equivalent aspx page for existing php page.

How to handle XMLHttpRequest on the server-side?

I have a js method as follows

function post(tpt,id_ref,f){
var url_server=
	var http = new XMLHttpRequest();
	var url;
		case 1:
			url	= url_server + "enroll.php";
		case 2:
			url	= url_server + "attend.php";
	var params;
	if(id_ref == 0)
		params = "tpt="+encodeURIComponent(tpt);
		params = "tpt="+encodeURIComponent(tpt)+"&id="+id_ref;
	http.open("POST", url, true);
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.setRequestHeader("Content-length", params.length);
	http.setRequestHeader("Connection", "close");
	http.onreadystatechange = function() {	//Call a function when the state changes.
		if(http.readyState == 4 && http.status == 200) {
			var Objpost = eval('(' + http.responseText + ')'); //Adaptate the return to an Object form
				case 1:
					document.getElementById('log').value = document.getElementById('log').value + "Enrolled 

Question of replacement of if..else conditions with design pattern



I am working on an application which contains code in lot of places where certain objects are created based on certain condition. The code is something like the following:

if(affectedObject == "Customer")
     Customer c  = new Customer();
else if(affectedObject == "Salesman")
     SalesMan s = new SalesMan();

// or 

     case "Manager":
          // Do some processing.
     case "Employee":
          // Do another processing.


I have gone through design patterns once but I am not able to figure out how I can use a pattern to replace my code.

Can any one please help me with this? Any practical code sample would be of great help (code without refactoring and refactored code) so that I can understand it better.

Thanks in advance.

webdav xmlhttprequest to query current users exchange mailbox items


I would like to use xmlhttp request to display the current users unread email count in a webpart.  I can get this to work if the user enters their username & pw, but I'm not able to get any pass-thru credentials to work.  How can we set this up to pass through the current user's credentials.  We tried to set the sharepoint wfe with kerberos trusted delegation, but this doesn't seem to work.

We do not want to create an account with full access to all private mailboxes.

SQL 2008 and above - xp_cmdshell replacement ?


Hello All !

"xp_cmdshell" is not a recommanded SQL command (security and so on) ... in SQL 2005 or >, but is there a simple command to do the same things with security with SQL 2008 or R2 or > ?

do I need to use SMO objects or include Powershell command in my queries ?


Thanks for advance for your ideas / help - Regards - Have a nice day ! RHUM2

XmlHttpRequest not working with iE (Working with all other browser Except IE)


Hey Friends, I am trying make 1 simple chat application like gmail,facebook etc. I am using VS 2008 and code AJAX.

I have wrtten one javascript code for sending and receiving messages from other page. Even its working fine with other browser except IE.

I am using XMLHttpRequest Object.

Here is my javascript code....

<script type="text/javascript">

var sTimeInterval;
function timedRefresh()
sTimeInterval = setTimeout("SetUrl()",4000);
function GetXmlHttpObject(handler)

var objXmlHttp = null;
if (navigator.userAgent.indexOf("Opera") >= 0)
alert("This example doesn't work in Opera")

var xmlHttp = null;
if (window.XMLHttpRequest)

objXmlHttp = new XMLHttpRequest();
objXmlHttp.onload = handler;

data type with Varchar replacement


Hi all

I was using derived column for  replacing null values with datatype into value 0 , varchar into '$$'. Now I would like to replace with data type Varbinary.Can any one suggest replacement with which value.

I am passing the '0' for datatype int and '$$' for datatype varchar. can any one suggest for datatype varbinary what value I have to pass?

XmlHttpRequest not working with Framework 4.0




In Studio '05 and '08 I've used pretty much used a standard call.. like:

ajax.open("POST", url) .. etc with a callback responce upon completion.

Works great when run locally and posted to a production server. I've started writting new code in VS '10 with the same aproach, however with some snags or a snag. Again the code works great locally, but published to either a production server or even my local desktop I get "Internal error" or not found..

The url is local on the site I'm writting... Workers/Sqlpipe.aspx

I've tried / or ~/ neither help, and it only seem to happen with 4.0, I've switched the target framework to 2.0, then 3.0 and 3.5... and the code works fine, its only with 4.0..

Please advise with any help or remidies..



what is the ntwdblib.dll replacement in sql 2008? or where to install it


the vendor needs ntwdblib be installed to connect a sql 2008 sp1 server, holding database with 80 compatible level.

I din't find this library in sql 2008, searched and found it is deprecated, my question is where to find this dll? and what folder on the new machine with sql 2008 client installed should I paste into?



ActiveX control replacement by silverlight technology



We developed an ActiveX plug-in for PowerPoint on Windows  The control allows content to be created in some graphical application, transferred to a PowerPoint presentation, and manipulated in 3D in PowerPoint in a view-only manner.  Graphical application is a scientific application which provides ability to create atoms, molecules, defining their bonding and defining surfaces, so user basically create molecules, proteins into the application and transfer it into ActiveX control using  copy-paste.

We want to shift this technology from ActiveX to other, so that it can be used by any software like Microsoft Word, SharePoint, Web browser, and Microsoft Excel.


Can someone tell me alternative of ActiveX? What other technologies can be used to develop same functionality in Microsoft domain? Any pointers indicating for Advantage and disadvantage of using ActiveX and other proposed technology?

I heard about Silverlight, but I do not know anything how it would be useful and how it is beneficial over ActiveX?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend