static and call non static constructor

Posted on 2015-01-20
Medium Priority
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.

        public static string mymethod(test[] tester)
            Class foo = new class();


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


Open in new window

Question by:Seven price
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 44

Expert Comment

ID: 40560520
>> any suggestions.

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

Author Comment

by:Seven price
ID: 40560531
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.

Author Comment

by:Seven price
ID: 40560536
unless there is a way to add your asp.net controls to a static method.?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 44

Accepted Solution

AndyAinscow earned 1500 total points
ID: 40560545
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.

Author Comment

by:Seven price
ID: 40560561
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.

Author Closing Comment

by:Seven price
ID: 40560687

Featured Post

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

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