.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

Posting data from ASP to WebService

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :.NET Framework
Hello. How can I post 2 parameters from classic ASP to WebService? I have classic ASP that contain few strings (could be 1 or 3). I need to send them to C# Web Service.   Any help will be great. Thanks.Amir

View Complete Post

More Related Resource Links

Posting data to ASMX and return Object for jQuery


I am using fluent NHibernate with WebForms and I am trying to build a page where I allow a user to post a status update on their profile page and I a using a .asmx WebService to post the data to the database and then returnig a StatusUpdate instance to the page to be used by jQuery. I have a couple problems.

1) First off when I return a string from the WebService(i was testing) the textbox where the user enters their status doesnt empty the contents. And since the page doesnt refresh even if I manally clear out the textbox and put in something else, it still posts the previous status to the database again. How do I fix this?

2) Secondly, when I return the StatusUpdate Object from the Webservice I cant the results to display anything. Like I sad, Im using jQuery to make an AJX call to the WebService.

Here is my code:

User Profile Page:

Status: <asp:Label ID="status" runat="server"></asp:Label><span style="font-size:.7em;"><asp:Label ID="statustime" runat="server"></asp:Label></span><br />
<textarea id="statusBox" rows="3" cols="40"></textarea><br />
<input type="button" value="Update Status" onclick="SetStatus(); return false;

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. 

[newbie] How to return a data record from a webservice (wsdl)?



vs2010, .NET 4.0

I have a webmethod which I want to return a data record (for example: name, surename, address, age, zip etc)

I wonder how to accomplish this. I think the solution is about creating an object which contains all the records serialized. And then the webmethod returns this serialized object. I'm not 100% sure how to accomplish this, if some of you good provide me with some tips, tutorial or link to an article explaining it, that would be great

Data access from Remote system throwgh webservice

Hi, i wrote the webservice and configured in our server and having access the service through the browser from another system also working fine, But i am trying to access the service through in my application creating the proxy and accessing methods of the webservice, but it can't get the data from  the remote sqlserver through the webservice.    this is for my connection string  in  web config:   <add key="ConnectionString" value="server=EVEREST;initial catalog=MRMv1;uid=sa;pwd=kk"/>   the following the error was shown to me: Server was unable to process request. ---> Login failed for user 'sa' but i can login to sqlserver using 'sa' user in the remote server. how can i get the data from the remote server.        can you please guide to me. thanks and regards brite

Posting data to a website (HTTPS) from a Desktop Application in Visual Basic (.Net 3.5 or .Net 4.0)

Hello everyone, I'm trying to create a desktop application that will update my IPv4 address to an IPv6 Tunnel broker.  I have the app running up to the point where it sends the data to the website, and then I get exceptions.  I'd like someone to take a look at my code, and tell me what I've got wrong (if anything).  Here's the code that I have (the only portion that is filled in is for Hurricane Electric) Dim strUsername As String = txtUsername.Text.ToString 'User Id supplied by the User. Dim strPassword As String = txtPassword.Text.ToString 'Password supplied by the User. Dim strPasswordHash As String = "" ' this will be created from the hashing of the password supplied by the user. Dim strTunnelID As String = txtGlobalTunnelId.Text.ToString 'Global Tunnel ID (He.net and ) Dim strUrl As String = "" ' Place holder for the URL Which will be provided after the password is hashed and specified by the tunnel broker. Dim strTunnelBroker As String = cbxTunnelBroker.SelectedItem 'Sets the Tunnel Broker to the user specified one. Dim wc As New WebClient() 'Allows for posting data to the server 'holds the server response. Dim strData As String = "" 'Provides the data for the form. Dim result As String = "" Select Case strTunnelBroker Case

Posting form data and receiving a response

Hey everyone,I have an application that needs to post data to a url on the web and then receive an xml response.  I have an HTML form (provided by vendor) that posts the data correctly, however when clicking the submit button the page is redirected to the post url and the xml is displayed in the browser.  I need to do this on a postback within an existing asp.net project.  Basically, the user will fill out the form, the form data will post to the url, the xml response will be received, and the appropriate values will be displayed on the screen. I've found a bunch of examples for doing this but I just can't seem to get my head around it.  Can anyone point me in the right direction or explain how I should go about this?  Thanks for your help!Will

Query to the data connection or webservice

Dear Infopath Gurus, I am facing a problem while fetching data from a (web-based) Infopath form library, as a secondary data source. Background: I have connected text-boxes on the form with a form library (secondary source), these text boxes are suppose to fetch values from the associated columns (dynamic in nature) and display it on the web form. But whenever I reopen the form, these text boxes do not fetch or display the updated values in the columns. The temporary solution that I applied was, applying a rule (Query using a data connection) whenever a form opens/loads. This solution was bringing the updated values alright but as the number of forms in the form library increased, a form was taking more than a minute to load. Which is totally unacceptable at user end. I also tried to apply a similar rule (Query using a data connection) to the text boxes on the form but for some unknown reason its not fetching the updated values from the form library. I am carefully putting an easy condition to trigger the last mentioned rule but its not giving the required result. Problem: Despite associated/connected with the secondary source columns, the form is not fetching the updated values on its own If I associate a (data query) rule whenever the form opens or loads, it takes ages to load If I associate a (data query) rule with the text boxes instead it

SQL Data via SharePoint WebService?


I am working on a project that tracks users supply requests in SharePoint.

I have an extremely complicated workflow that is functional
I have the form now populating various data elements using SharePoint Profile data.
My next hurdle I am exploring is an auto-lookup area.
What I need to do is provide a method to the user to search (best if context enabled) standard stock numbers on the fly as they type in their request.

What I have is a SQL database with over 3 million rows of stock numbers and products.

What I am contemplating is:

1. Move all that data into a sharepoint list and explore opportunities there.

2. Use jQuery once the form is completed to do the backend querying

3. Connect SharePoint to the external datasource and pull the data in that way


I am sure this is something not that uncommon - probably more an "InfoPath" question than a SharePoint one, but...

Has anyone tackled this issue?  Any tips?

How to get Email of Current User Data View Web Part Sharepoint 2010 and pass to WebService data sour

I have to pass in the email address of the current user to a web service data source (run time) of a Data View Web Part.

My Question is:

a) How can I get Email address of current user based  in DVWP.
I know we can get the CurrentUser using the CurrentUserName but how do we get the Email for the Current User.

b) After getting the Email how do we pass to the Web Service.

Import table data using webservice


Hi all,  I'm starting using web services in .net , I'd like to know how to achieve this:

I need to import table data into a database, currently what we do is uploading via ftp the text files, and then running a process in php in the webserver.

Could this be automated  by sending those text files (or xml, or whatever format is necessary) to a webservice as an argument, and that the webservice handles the insert and validating process of the data?

Also I would need it to be secure, ideally I should send it login validation.

Anybody can help me with this?

Thanks a lot!

How can i insert a preloader when i'm fetching some data from webservice


Hi to all,

Lets say i'm retreiving some data or string to the server using a webservice. How can i insert a preloader?


get loggedin User profile data using webservice in infopath


Hi All,

my requirement is to get loggedin user data through webservice and displayed in InfoPath form. i have follow the below steps.

 Create the form

  1. Open InfoPath and design a new, blank form
  2. Save the form as UserProfilexsn


get loggedin User profile data using webservice in infopath


Hi All,

my requirement is to get loggedin user data through webservice and displayed in InfoPath form. i have follow the below steps.

 Create the form

  1. Open InfoPath and design a new, blank form
  2. Save the form as UserProfilexsn


InfoPath form using SQL webservice is not showing data



I've developed an InfoPath form using SQL webserivce which contain drop downs. In SharePoint, I created a Data Connection Library and Forms Library. In InfoPath forms, I'm using ucdx file which i placed in my Data Connection Library. I'm also using Full Trust and created new certificate. I published it using 'Enable this form to be filled out using a browser' option and 'Administrator-Approved form template'.

Using Central Admin, Manage Form Templates > Upload Form Templates. I uploaded InfoPath xsn file and activate it in the Site Collection. Now, I can see my form in the Form Templates library. I opened the form using 'Open in the client application', it asked for the username/password and opened the form in the InfoPath forms. It works absolutely fine. But, when i try to open the form using 'Display as a Web page', is doesn't show the values in the drop down which is coming through webservice. No error as well.

Any idea folks ?

Sohaib Khan | http://muhskhac.spaces.live.com

Posting data to another page


Can server.tranfer be used to post data to another page

How filter data from a webservice that returns a table by comparing dates


I have an infopath form that takes in brings in an entire table and I want to filter it on datetime by comparing records from a time span of dates that have already been assigned.  I have tried everything from doing it from the within infopath using equations to filter the datasource and also doing it programmatically.  I am to the point where I think it has to be done programmically (C#).  Here is an example of the XPath code I was trying:

(xdMath:Avg(xdXDocument:GetDOM("ISSOrbits")/dfs:myFields/dfs:dataFields/d:ISSOrbits/@Apogee[(number(translate(xdXDocument:GetDOM("ISSOrbits")/dfs:myFields/dfs:dataFields/d:ISSOrbits/@StartTime, "T-:+", "")) >= number(translate(/my:myFields/my:MissionData/my:LaunchMissionDateTime, "T-:+", "")))]))

It seem that only the first record (node) from ISSOrbits gets compared and not the whole dataset.

Please show me how to do this programmatically in C# or if there is way to do it without code.


Charles Picco

P.S. I forgot to mention that table is brought in through a webservice that cannot filter data.


Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.
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