[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

static and call non static constructor

Posted on 2015-01-20
6
Medium Priority
?
156 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:Seven price
[X]
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
6 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 40560520
>> 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: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.
0
 
LVL 9

Author Comment

by:Seven price
ID: 40560536
unless there is a way to add your asp.net controls to a static method.?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 45

Accepted Solution

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

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.
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 40560687
o
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 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