Thank you, i have a web service for my project that i connect to data base with it. i don't have problem with creating web service,but i couldn't create a function for this code. How i can return result and use it in my application? when i use dataset i returned dataset: <webmethode()> Public Function getusers() as DataSet dim da as new sqldataadapter dim ds as new dataset . . . . da.fill(ds,"Tbl") return ds end Function and i use this code in my application: protected sub btn1_click(....................) dim ws as new localhost.service gridview1.datasource=ws.getusers() gridview1.databind() end sub now i have that code for submit button , only i don't know how i can write it in webservice instead of application? <WebMethod()> _ Public Function FillAccordion() as ????????? Dim cn As New SqlConnection Dim cls As New ClsGeneral cn.ConnectionString = cls.GetConnection cls = Nothing Dim cmd As SqlCommand = New SqlCommand("SELECT Title, Abstract FROM Articles", cn) cn.Open() cmd.ExecuteReader() cn.Close() return ???????? End Function i couldn't write that code using function in web service and use function in submit button!
Hoda
modified on Tuesday, April 14, 2009 8:47 AM