Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2007, 05:23 PM
Authorized User
 
Join Date: Jan 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default can't make session("pageid") = 1 or 2 or 3..

Hi

 I have this code on my default.aspx.vb site:

Code:
Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub page_load(ByVal sender As Object, ByVal e As EventArgs)
        If Request.QueryString("PageIdentity") = Nothing OrElse Request.QueryString("PageIdentity") = "" Then
            Session("pageid") = "1"
        ElseIf Request.QueryString("PageIdentity") <> "" Then
            Session("pageid") = Request.QueryString("PageIdentity").ToString
        End If
    End Sub


End Class Here i want to say that if link is

Default.aspx then Session("pageid") = 1 bc Request.QueryString("PageIdentity") = nothing

Default.aspx?PageIdentity=2 then Session("pageid") = 2 bc Request.QueryString("PageIdentity") = 2



Right now i have this on my default.aspx site

Response.Write(Session(

"pageid"))
and
<SelectParameters>

<asp:SessionParameter DefaultValue="1" Name="MainID" SessionField="pageid" Type="Int32" />

</SelectParameters>
but i cant get the session("pageid") so it works, whats wrong !?







Similar Threads
Thread Thread Starter Forum Replies Last Post
Make 2 or 1 Muhammad Zeeshan SQL Server 2000 2 August 16th, 2007 01:10 PM
Can someone make this? JonathanRay C# 4 February 16th, 2007 08:57 AM
How can I make that? kalchev ASP.NET 2.0 Professional 0 April 3rd, 2006 07:01 AM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
Make use of ASPState to store session state ongong Classic ASP Professional 0 July 23rd, 2003 10:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.