Tough enough. 1: Save results with session and bind
session["Search"] = dsresults;
Dsresults = (DataSet) session["Search"];
Grdresults.databind ();
In fact, session,application is the object type, so the last thing you want to do is explicitly convert the type
By the way, it is null to judge whether the value of the string type is taken.
HtmlGenericControl div = new HtmlGenericControl ("div");
Div. Style.add ("Background-color", BG);
Use this class to represent HTML server control tags that are not directly represented by the. NET Framework classes, such as <span>, <div>, <body>, and <font>
return dataset
Public DataSet Contacts ()
{
String sql = "@ Select * from ...";
DataSet requests = new DataSet ();
New Sqldtaadapter (sql,conn). Fill (requests);
return requests. GETXML ();
return requests;
}
Receive: (When the return value is a dataset in XML format)
DataSet results = new DataSet ();
Results.readxml (new StringReader, FI. Contactrequest (userid)));
When using WebService, simply add the [WebMethod] feature to the Method!
If you add a cache, [WebMethod (cachedurition=600)]
Instantiation of WebService
Friendsservice.friendsinfo fi = new Friendsservice.friendsinfo ();
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.