hold value pass to web method

is it possible to hold value in webmethod and use it later.

Scenario.
submit from client side.
Retrieve values.
then server side code runs, retrieve the values  and reuse them running in the server side code or method.
LVL 9
Seven priceFull StackAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Miguel OzSoftware EngineerCommented:
Could you clarify your scenario?
IF you already retrieved the values why you just call the new methods using the values as parameters.

If above is not the case and if your web method is implemented as an asp.net web service  you could use Session as shown in this example.
0
Seven priceFull StackAuthor Commented:
ok the asp.net button control uses the client-side function to invoke the web method once the web method invokes it runs through the cold then I needed to take those values and send it to the server side when I needed simultaneously
0
Rajar AhmedConsultantCommented:
Could you please follow the below link ,
http://www.aspsnippets.com/Articles/Calling-ASPNet-WebMethod-using-jQuery-AJAX.aspx

Let me know , if you need further assistance.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Bob LearnedCommented:
Session variable?
0
Miguel OzSoftware EngineerCommented:
"it runs through the cold then I needed to take those values and send it to the server side "
Please clarify this sentence, are you running the web service code  and then sending  the values to a server?
Where is this server?  another web service? or the same server as your web service? or another web method or process in the same server as your web server?
or
Are you trying to call a web method and your issue is how to send the values from client side (JavaScript) to server?
For this last scenario the easy way is using JQUERY AJX. An example on how to send parameters using AJAX is shown here
if you still need to store the web service parameters you could use Session as suggested in my first post.
0
Seven priceFull StackAuthor Commented:
thanks, I know it was confusing but I decieded to just make it all angularjs using a webmethod. thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.