Home All Groups Group Topic Archive Search About
Author
16 Feb 2006 6:37 PM
VJ
I've created a handful of pages (with attached master files) and I want
to use session variables, but trying to access to the
Request["formvalues"] is really difficult.


<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="FirstPage.aspx.cs" Inherits="FirstPage"
Title="First Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<asp:DropDownList ID="podiumdropDown" runat="server">
            <asp:ListItem Selected="True">No</asp:ListItem>
            <asp:ListItem>Yes</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" PostBackUrl="SecondPage.aspx"
UseSubmitBehavior="False" />

</asp:Content1>


on my second page i can't retrieve this value.....
i get  Request["podiumdropDown"].ToString(); is null!!!!

SecondPage.aspx.cs

    protected void Page_Load(object sender, EventArgs e)
    {
Session["podiumdropDown"] = Request["podiumdropDown"].ToString();

    }

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Author
16 Feb 2006 10:50 PM
clintonG
You have to get the value from the DDL and then populate a Session variable
using that value. The value from the DDL doesn't jump into a Session
variable all by itself. Furthermore, you probably don't even need to use a
Session variable.

<%= Clinton Gallagher

Show quoteHide quote
"VJ" <vnc***@hotmail.com> wrote in message
news:%23h2eGgyMGHA.3264@TK2MSFTNGP11.phx.gbl...
> I've created a handful of pages (with attached master files) and I want
> to use session variables, but trying to access to the
> Request["formvalues"] is really difficult.
>
>
> <%@ Page Language="C#" MasterPageFile="MasterPage.master"
> AutoEventWireup="true" CodeFile="FirstPage.aspx.cs" Inherits="FirstPage"
> Title="First Page" %>
> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
> Runat="Server">
>
> <asp:DropDownList ID="podiumdropDown" runat="server">
>            <asp:ListItem Selected="True">No</asp:ListItem>
>            <asp:ListItem>Yes</asp:ListItem>
> </asp:DropDownList>
> <asp:Button ID="Button1" runat="server" PostBackUrl="SecondPage.aspx"
> UseSubmitBehavior="False" />
>
> </asp:Content1>
>
>
> on my second page i can't retrieve this value.....
> i get  Request["podiumdropDown"].ToString(); is null!!!!
>
> SecondPage.aspx.cs
>
>    protected void Page_Load(object sender, EventArgs e)
>    {
> Session["podiumdropDown"] = Request["podiumdropDown"].ToString();
>
>    }
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com
Author
17 Feb 2006 3:56 AM
Christopher Reed
What is Request["poduimdropDown"]?  Session variables use Session["<variable
name>"].  Are you looking to use Request.Form?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"VJ" <vnc***@hotmail.com> wrote in message
news:%23h2eGgyMGHA.3264@TK2MSFTNGP11.phx.gbl...
> I've created a handful of pages (with attached master files) and I want
> to use session variables, but trying to access to the
> Request["formvalues"] is really difficult.
>
>
> <%@ Page Language="C#" MasterPageFile="MasterPage.master"
> AutoEventWireup="true" CodeFile="FirstPage.aspx.cs" Inherits="FirstPage"
> Title="First Page" %>
> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
> Runat="Server">
>
> <asp:DropDownList ID="podiumdropDown" runat="server">
>            <asp:ListItem Selected="True">No</asp:ListItem>
>            <asp:ListItem>Yes</asp:ListItem>
> </asp:DropDownList>
> <asp:Button ID="Button1" runat="server" PostBackUrl="SecondPage.aspx"
> UseSubmitBehavior="False" />
>
> </asp:Content1>
>
>
> on my second page i can't retrieve this value.....
> i get  Request["podiumdropDown"].ToString(); is null!!!!
>
> SecondPage.aspx.cs
>
>    protected void Page_Load(object sender, EventArgs e)
>    {
> Session["podiumdropDown"] = Request["podiumdropDown"].ToString();
>
>    }
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com