.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

webservice instead of updatepanel

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

I have 2 textboxes tb1 and tb2. When I change a value in tb1, it retrieves data from the database based on the entered value for tb1 and displays the retrieved data in tb2. This is done asynchronously. I use UpdatePanel for that. But I wonder if there's a better way to do it such as using webservice. If yes, how can that be done? AutocompleteExtender and CascadingDropDown controls allow you to specify a ServiceMethod to retrieve data from database. Since I'm not using any of these 2 controls, I don't know how to specify a ServiceMethod for the textbox. 

View Complete Post

More Related Resource Links

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

Gridview inside updatepanel


I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..

saving XML output from webservice


 I created a webservice that takes casenum as input and gives results as a dataset in an XML.

I could make a web client to display the resulting dataset in a grid view. Pls see my code copied below.

Now I want to create a console client that takes the casenum as input, to call the webservice and saves the resulting xml for further processing, but can't figure out how to just capture the xml to save. Here's the code for my web client. I would appreciate if you could help modify this tocapture the resulting xml to save file locally.

Thank You.

namespace ResultsWebServicesClient
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)

        private void BindDataToGrid(string CaseNum)
            FG_Results results = new FG_Results();
            DataSet ds1 = new DataSet();
            ds1 = results.Get_FG_Results(CaseNum);
            GridView1.AutoGenerateColumns = true;
            GridView1.DataSource = ds1.Tables[0];

        protected void GetResults(object sender, EventArgs e)


HTTP Post and WebService


I am working on a application which will accept the data in the post request. My application also wants to expose a web service and want to call another web service. Considering all these 3 action that I want to do, can I create a single application which will have a web form which will accept the POST request and expose a web service at the same time.

Although it may be possible to achieve this, Is this a correct way of doing it?

Calling webservice from the server


I have a sample web service and aspx file. I deployed them to an existing website that contains classic asp files.

web-service: --- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; [WebService(Namespace = "http://localhost/MyWebServices/")] public class MembershipRegisWebService : System.Web.Services.WebService { public MembershipRegisWebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World."; } }

aspx.cs file: --- using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; public partial class CallWebService : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { MembershipRegisWebService mrWs = new MembershipRegisWebService(); Response.Write("Calling web service:" + mrWs.HelloWorld()); } }

It runs locally, but it shows an error when running it from the server:

Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the follow

C# / Java webservice


I am writting a client applicatin that acesses a webservice written by another company.  I need to test against this webservice but since it is live I need another place to test with.  I don't have access to the code from the webservice but have added a reference to my project.  I would like to create a test platform using C# which will run on IIS and not Java.

I have created a basic webserive using both the NetBeans platform and the VS/C# platform.  The problem I am having is if I dynamically change the web address from one to the other my client application complains that the webservice is invalid.  I have verified all the calls are the same.

Are there any setting with VS/C# that allow me to configure it to behave more like the Java webservice?  I don't have the server support to host the Java application for full testing along with other problems using the Java version.

I have run both services in the "WCF Test Client" and can see where the WCF service uses the varibles for request and the Java uses body/request but can't get the WCF to follow that format.  I read somewhere about changing the OperationContract with SoapRpcMethod but then the mentod is not longer exposed. I also tried a Web Service in .NET 3.5 instead of a WCF server but that seems to be more trouble and does not

Printing crystal report from webservice



I am trying to print crystal repot directly from a C# application, which is calling webservice. I am able to display report in crystalreportviewer by passing the webservice call to datasource. However, is there anyway, I can print directly without showing the report?

Alternatively, I was trying return ReportDocument object from webservice, which would solve my problem, but I was unable to return the ReportDocument because of serialization issue. Is it even possible? Thank you


Wicked Code: UpdatePanel Tips and Tricks


Jeff Prosise explains when it's better to use UpdatePanel and when it's better to use asynchronous calls to WebMethods or page methods instead.

Jeff Prosise

MSDN Magazine June 2007

How do you insert a google map into an ajax updatepanel?


I have built a site that I am using google maps on.  The default page has a google map with info windows containing links and all works great... until a user clicks on the link in the info window.  Doing so takes them to a community page that I have built.  On this community page, I have an ajax update panel that has 2 panels nested inside of it with the visibility set for one to be on and the other off.  The default panel shows community photos, and the second panel I want to show the google map and common directions to the community.  In testing, my buttons to switch the visibility of the panels works great as it should without postback, but when I try to add the map to its panel, it does not show up.  I am new to ajax as well as google maps and I'm not sure why the same code would work fine on my default page but not the community page.  The only obvious thing I can assume is because the community page map is in an update panel.  

How do you insert a google map into and ajax updatepanel and have it work correctly?  Many thanks in advance. 

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick


First post bear with me please:

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help

UpdateProgress with a dummy updatepanel not working


I have a Submit button and some functionality like updating DB and fetching next page in the button click event. This process takes a long time and I want to display a message saying "Progress...." right after clicking the botton. I want to do the same in 20 other pages. So, best way to do it wd be to put the modalpopup MPE or an Updateprogress in a usercontrol or in master page. I first tried putting both of these on the page itself to test and see and neither worked.

I tried using Update progress control with a dummy updatepanel and giving the Submit button as Asyntrigger to the dummy updatepanel. I have also tried using MPE but it didnt work either. Below is an example of what i did..

<asp:UpdatePanel ID="UpdatePanel1" runat=server><contenttemplate><triggers><asyntrigger ID= "Submit"> /> /> />

<asp:updateprogress ID="Progress1" unat=server AssociatedUpdatePanelID="UpdatePanel1"><Progresstemplate>Progress.... />/>

<asp:button ID= "Submit" runat=server >

I have nothing for updateprogress in code behind. Am i missing or doing somethign wrong here? Any help would be appreciated.

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

Webservice using socket layer programming



   I want to access a webservice in asp.net programming. This webservice was done using socket layer programming and also i am having the ipaddress and port address. Did any one know about how to access webservice using socket layer and if know let me know how to access the webservice. Thank you

UpdatePanel in a Webpart


I'm exploring the usage of UpdatePanels in WebParts for MOSS 2007. The code I have so far for adding a test update panel is this:

                LinkButton goButton;
                goButton = new LinkButton();
                goButton.ID = "butGo";
                goButton.Text = "Go";
                goButton.Command += new CommandEventHandler(goButton_Command);
                goButton.Click += new EventHandler(goButton_Click);

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

Total newbie question: Calling jQuery in an UpdatePanel?



Please forgive this ignorant question - I've used ASP.NET AJAX a good deal but I'm new to jQuery.  Specifically, is it possible to call or create jQuery events on the fly via an UpdatePanel?  For example, calling a jQuery modal or animating a Label (or <div> contained Literal), etc.

If anyone has any advice or could point me to some easy tutorials on mixing ASP.NET AJAX and jQuery, I'd greatly appreciate it. 



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