Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 367.3k

Access asp controls inside a public static method

Dec 29 2016 12:08 AM
I have a Asp form.in my code i have a static method i want to access the page controls Inside the static method.Suggest some ideas..
  1. [System.Web.Services.WebMethod]  
  2.  public static Dictionary<string, object> LoadAssetAssignView()  
  3.        {  
  4.       datetime mydate=datetime.parse(TextBox1.Text);//Can't access the form control  
  5.       .  
  6.       .  
  7.       .  
  8.       .  
  9.       .  
  10.        }  
 

Answers (6)