How to call Webservice in button click....????

Posted by Jenniffer under ASP.NET on 12/7/2012 | Points: 10 | Views : 2663 | Status : [Member] | Replies : 7
Somebody help me out from this issue....

I have created one html page.. In that page i have 4 labels, 4 textboxs and 1 button.... and i created one webservice as a separate solution.... In webservice page, i have coding's to insert those data's which is from html page.... After that i don't know to link both html page and webservice.....

Pls Somebody help me out.....

Thanks & Regards
JENI



Responses

Posted by: Saratvaddilli on: 12/7/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi jeni,
just right click on your solution
---> add webreference : now add your webservice to your website which consists of html page
........In Code Behind....
---> include namespace of the webservice and now create an object on the webservice and utilize it.....





Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudeesh.Govind on: 12/7/2012 [Member] Starter | Points: 25

Up
0
Down
You can also use jqury / javascript for calling webservice

learn and earn

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jenniffer on: 12/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Sarat,
i have to run tat webservice separately.... and my doubt s after i click html button i have to call tat service, how i'll call tat n html button???


Thanks & Regards
JENI

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jenniffer on: 12/7/2012 [Member] Starter | Points: 25

Up
0
Down
I have tried tat too.... but it's not working.....

Thanks & Regards
JENI

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saratvaddilli on: 12/7/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
do one thing
in on click method, create an object on the web-service and utilize hope this helps you..

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jenniffer on: 12/7/2012 [Member] Starter | Points: 25

Up
0
Down
how to create an object of Web-service in on click method....???

Thanks & Regards
JENI

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 12/11/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

why try to html

put aspx page then put button control invoke them this is easy then html button only invoke action method so thats not proper way.

try to aspx controls for this.


Mark as Answer if its helpful to you

Jenniffer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response