Link to home
Start Free TrialLog in
Avatar of Seven price
Seven priceFlag for United States of America

asked on

static and call non static constructor

Ok when I submit to the static method to call the non static I cannot retrieve asp.net control values. only if I put it in a submit button. any suggestions.

[WebMethod]
        public static string mymethod(test[] tester)
        {
          
            Class foo = new class();
            foo.loadcontrol();
}

  

void loadcontrol()
{
int mygroupid;
 mygroupid= int.Parse(dropdownlist.Value),

}

Open in new window

Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

>> any suggestions.

A little more explanation.  I don't understand what you are doing or what your problem is.
Avatar of Seven price

ASKER

ok static method calling a non static method.  I need to retrieve the values from the asp.net control dropdownlist and textbox. I know it looses it when submitting to the method first but I am using a static method to also send json values.
unless there is a way to add your asp.net controls to a static method.?
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well the example I am showing up top allows it to hit the non static but yea cannot get the control values. looking at alternatives.
o