?
Solved

how to get ItemCommand (arg) from aspx in usercontrol

Posted on 2011-10-30
6
Medium Priority
?
244 Views
Last Modified: 2012-05-12
Have the main page with a list of link buttons, user selects one and want the usercontrol (ascx) portion to load with the selected value.
0
Comment
Question by:crundle
  • 4
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 2000 total points
ID: 37055157
Hi! This is a little bit strange scenario, but I guess the values you need should be somewhere in Request.Params collection. Request.Params["__EVENTTARGET"] should contain button id (so you know that proper button was clicked) and Request.Params["__EVENTTARGUMENT"] should contain button command arguments.

http://www.spsamples.com/2011/09/aspnet-get-client-data-at-onload-event.html
0
 

Author Comment

by:crundle
ID: 37056540

not really, just trying to get the value from the commandarg to the usercontrol and update the ascx page to be displayed with the info
0
 

Author Comment

by:crundle
ID: 37082677
I've requested that this question be deleted for the following reason:

never was response to question
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 18

Expert Comment

by:ivan_vagunin
ID: 37077185
Hi! Why do you delete this question? Did you try Request.Params["__EVENTTARGUMENT"]? Another solution is to create public property for you user control and set it explicitly in button event handler. Indeed this question has many  solutions, but you have to choose one that is most sutable for your scenario.
0
 

Author Comment

by:crundle
ID: 37082678
solution was correct
0
 

Author Closing Comment

by:crundle
ID: 37082679
not what I was thinking but, works perfectly
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline
Suggested Courses

809 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