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

x
?
Solved

How do I pass querystring from the detailsview update?

Posted on 2010-11-08
2
Medium Priority
?
457 Views
Last Modified: 2012-05-10
Dear Experts,

I have this DetailsView with ShowEditButton set to true. When user click Update, I need to pass a querystring from inside the EditItemTemplate, the value of the querystring should be from one of the dropdown selectedvalue. How can I do that?
Thanks,
Dan
0
Comment
Question by:luisr69
[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
2 Comments
 
LVL 41

Accepted Solution

by:
guru_sami earned 2000 total points
ID: 34095402
You want to pass querystring to what?
You can definitely grab the value of dropdown something like this in the DV ItemUpdating event that is fired when you click the Update button:

protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
    {
        DropDownList ddl = (DropDownList )DetailsView1.FindControl("DropDownList 1");
        string value = ddl.SelectedValue;

       //OR try getting new value using correct index / name of your ddl field
        string newvalue = e.NewValues[1].ToString();

       //you can use this value to pass it to querystring
    }
0
 

Author Comment

by:luisr69
ID: 34096148
I use this:

protected void DetailsViewAuditEdit_ItemUpdated(Object sender, System.Web.UI.WebControls.DetailsViewUpdatedEventArgs e)
    {
        DropDownList ddl = (DropDownList)DetailsViewAuditEdit.FindControl("lstBranch");
        string value = ddl.SelectedValue;
        //pass the query string
     }

And it works. That's what I was looking for. Thanks.
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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

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