Abhijeet Dev
1/23/2003 11:28:00 AM
u can use session variables to store it, even if u r using code behind
Abhijeet Dev
"Don Schilling" <notreal@fake.com> wrote in message
news:ukJSZ0mwCHA.2304@TK2MSFTNGP10...
> How do I pass pass a drop down list box selected value from a web form
that
> contians code behind to another web form that contains code behind?
>
> I've read several ms docs that state if I pass from code behind to code
> behind, I must complie both behind pages into one dll. I'd rather not do
> this. I've found good articles on passing InLine to InLine. But they
seem
> to fail when the receiving page has any type of code behind involved.
>
> Is there a way to pass from in-line to receiving in-line when the
receiving
> is using code behind for other things?
>
> Example, this works until last receiving page line:
> I put ClassName="FirstPageClass"
> and
> Public ReadOnly Property FirstName() As String
> Get
> Return first.Text
> End Get
> End Property
> into the sending page.
>
> This is the receiving page:
> <%@ Reference Page="SendOne.aspx" %>
> <HTML>
> <HEAD>
> <script runat="server">
>
> Dim fp As FirstPageClass
>
> Sub Page_Load()
> If Not IsPostBack Then
> fp = CType(Context.Handler, FirstPageClass)
> End If
> End Sub
>
> </script>
> </HEAD>
> <body>
> <form id="Form1" runat="server">
> Hello
> <%=fp.FirstName%>
> <%=fp.LastName%>
> </form>
> </body>
> </HTML>
>
> This works fine until I add the code behind line:
> <%@ Page Language="vb" AutoEventWireup="false" Codebehind="ROne.aspx.vb"
> Inherits="MI3.ROne" %>
> The code behind will be needed for a datagrid.
>
> Then I get:
> Exception Details: System.NullReferenceException: Object reference not set
> to an instance of an object.<%=fp.FirstName%>
>
> How are others handeling gathering 6 or 7 inputs from a user, then
> displaying some db results? This would look terrible if the data grid
> appeared underneath all the form questions on the same page.
> Thaks
>
>