Solved

static and call non static constructor

Posted on 2015-01-20
6
130 Views
Last Modified: 2015-01-20
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

0
Comment
Question by:sevensnake77
  • 4
  • 2
6 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
>> any suggestions.

A little more explanation.  I don't understand what you are doing or what your problem is.
0
 
LVL 9

Author Comment

by:sevensnake77
Comment Utility
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.
0
 
LVL 9

Author Comment

by:sevensnake77
Comment Utility
unless there is a way to add your asp.net controls to a static method.?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
Comment Utility
If I understand you right then no can do.
A static method does not know anything about the current object, unless you pass an instance into the static method.
0
 
LVL 9

Author Comment

by:sevensnake77
Comment Utility
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.
0
 
LVL 9

Author Closing Comment

by:sevensnake77
Comment Utility
o
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now