Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Context.Cache.Insert("foo", _
- Foo, _
- Nothing, _
- DateAdd(DateInterval.Minute, 30, Now()), _
- System.Web.Caching.Cache.NoSlidingExpiration)
- <WebMethod(CacheDuration:=60)> _
- Public Function HelloWorld() As String
- Return "Hello World"
- End Function
- public class WebServiceClass
- {
- private static DataTable _myData = null;
- public static DataTable MyData
- {
- get
- {
- if (_myData == null)
- {
- _myData = ParseJsonDataReturnDT();
- }
- return _myData;
- }
- }
- [WebMethod]
- public string GetData()
- {
- //... do some stuff with MyData and return a string ...
- return MyData.Rows[0]["MyColumn"].ToString();
- }
- }
Add Comment
Please, Sign In to add comment