Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SelectedIndexChanged pass value in Querystring

LEGEND ,
Jan 19, 2007 Jan 19, 2007
I have a method that fires OnSelectedIndexChanged in my code-behind:

protected void state_SelectedIndexChanged(object sender, EventArgs e)
{
string id = state.SelectedValue.ToString();
if (state.SelectedItem.Value != "0")
{
Response.Redirect("~/statedetails.aspx?id=" + id);
}
}

When the page redirects it doesn't pass the id value? How can I pass the id
value?

Any help is appreciated.

Thanks.


TOPICS
Server side applications
340
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2007 Jan 22, 2007
LATEST
Try changing the definition line to

string id = state.SelectedItem.Value.ToString();

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"-D-" <nobody@nospam.com> wrote in message
news:eosahl$7hr$1@forums.macromedia.com...
>I have a method that fires OnSelectedIndexChanged in my code-behind:
>
> protected void state_SelectedIndexChanged(object sender, EventArgs e)
> {
> string id = state.SelectedValue.ToString();
> if (state.SelectedItem.Value != "0")
> {
> Response.Redirect("~/statedetails.aspx?id=" + id);
> }
> }
>
> When the page redirects it doesn't pass the id value? How can I pass the
> id
> value?
>
> Any help is appreciated.
>
> Thanks.
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines