Hast Du in der web.config die Konfiguration f�r die Sessionbehandlung
�berpr�ft?

Teste die Sessions doch mit zwei anderen Dateien.
In der einen legst Du die Session-Variable an [Session("myDatum") =
Datum], in der anderen L�sst Du sie �ber
Response.Write(Session("myDatum").ToString()) anzeigen.

Ist dir aufgefallen, dass jemand auch den 31.2. ausw�hlen k�nnte? Warum
behandelst Du das Datum nicht anders? Den Monatsnamen z.B. bekommst Du
auch anders raus...

C# Syntax...
DateTime dt = new DateTime(JahralsInt,MonatalsInt,TagalsInt);
String Monatsname = dt.Date.ToString("MMMM");


________________
andre.seifert
@xmmm.de

-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Im
Auftrag von [EMAIL PROTECTED]
Gesendet: Montag, 20. Januar 2003 12:17
An: [EMAIL PROTECTED]
Betreff: [Asp.net] Verwendung von SessionState

hallo,

ich habe ein problem mit der verwendung von SessionState. ausschnitte
der wichtigsten 3 dateien habe ich hineinkopiert.

in WebForm1.aspx verwende ich das object-Tag um eine weitere datei zu
"integrieren", diese ist eigentlich eine SVG (Scaleable Verctor
Graphics) Datei, die auch mit ASP.NET "komplettiert" werden soll (Werte
aus Datenbank).

in WebForm1.aspx.vb m�chte ich einen aus den 3 DropDownListen
zusammengesetzten Datumswert in Session("MyDatum") ablegen. die in
WebForm1.aspx integrierte SVG-Datei temperatur_svg.aspx (also das dort
enthaltenen VB) soll Session("MyDatum") dann auch verwenden, tut es aber
nicht. wo liegt da der fehler ? ich dachte Session ist w�hrend einer
Session in allen Dateien bekannt.

Ich hoffe Ihr k�nnt mir bei diesem Problem weiter helfen.
Besten Dank
neblaz

P.S.
auch die Verwendung von IsPostBack in temperatur_svg.aspx geht nicht,
das ding h�ngt dann bis ich den Browser schlie�e.


************* 
WebForm1.aspx 
************* 

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"
enableViewState="True"%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML> 
<HEAD> 
<title>WebForm1</title> 
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0"> 
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0"> 
<meta name="vs_defaultClientScript" content="JavaScript"> 
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5";> 
</HEAD> 
<body MS_POSITIONING="GridLayout"> 
<form id="Form1" method="post" runat="server"> 
<asp:Table id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION:
absolute; TOP: 0px" runat="server" Width="465px" Height="480px"
BorderWidth="0"> 
<asp:TableRow BorderWidth="0px" Height="395px"> 
<asp:TableCell> 

<object data="temperatur_svg.aspx" width="480" height="395"
type="image/svg+xml" VIEWASTEXT> 
</object> 

</asp:TableCell> 
</asp:TableRow> 
<asp:TableRow Height="40px"> 
<asp:TableCell BackColor="Black"> 
<asp:DropDownList runat="server" Height="20px" Width="100px"
ID="DropDownList2" style="Z-INDEX: 103; LEFT: 93px; POSITION: absolute;
TOP: 410px"> 
<asp:ListItem Value="1">1</asp:ListItem> 
<asp:ListItem Value="2">2</asp:ListItem> 
...
<asp:ListItem Value="30">30</asp:ListItem> 
<asp:ListItem Value="31">31</asp:ListItem> 
</asp:DropDownList> 
<asp:DropDownList runat="server" Height="20px" Width="100px"
ID="DropDownList3" style="Z-INDEX: 104; LEFT: 193px; POSITION: absolute;
TOP: 410px"> 
<asp:ListItem Value="1">Januar</asp:ListItem> 
<asp:ListItem Value="2">Februar</asp:ListItem> 
...
<asp:ListItem Value="11">November</asp:ListItem> 
<asp:ListItem Value="12">Dezember</asp:ListItem> 
</asp:DropDownList> 
<asp:DropDownList runat="server" Height="20px" Width="100px"
ID="DropDownList1" style="Z-INDEX: 102; LEFT: 293px; POSITION: absolute;
TOP: 410px"> 
<asp:ListItem Value="2002">2002</asp:ListItem> 
<asp:ListItem Value="2003">2003</asp:ListItem> 
</asp:DropDownList> 
</asp:TableCell> 
</asp:TableRow> 
<asp:TableRow Height="35px"> 
<asp:TableCell BackColor="Black"> 
<asp:Button runat="server" Width="100px" ID="Button1" Height="25px"
Text="Button" style="Z-INDEX: 105; LEFT: 193px; POSITION: absolute; TOP:
445px"></asp:Button> 
</asp:TableCell> 
</asp:TableRow> 
</asp:Table> 
</form> 
</body> 
</HTML> 



**************** 
WebForm1.aspx.vb 
**************** 

Imports System.Data 
Imports System.Data.OleDb 

Public Class WebForm1 
Inherits System.Web.UI.Page 
Protected WithEvents Table1 As System.Web.UI.WebControls.Table 
Protected WithEvents DropDownList2 As
System.Web.UI.WebControls.DropDownList 
Protected WithEvents DropDownList3 As
System.Web.UI.WebControls.DropDownList 
Protected WithEvents Button1 As System.Web.UI.WebControls.Button 
Protected WithEvents DropDownList1 As
System.Web.UI.WebControls.DropDownList 

#Region " Web Form Designer Generated Code " 

'This call is required by the Web Form Designer. 
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent() 

End Sub 

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init 
'CODEGEN: This method call is required by the Web Form Designer 
'Do not modify it using the code editor. 
InitializeComponent() 
End Sub 

#End Region 

Dim Datum As String 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load 
Dim MonatVolltext As String 
Dim tmpDate As String 
Dim dummy() As String 
If Not IsPostBack Then 
Datum = "#" + Now.Month.ToString + "/" + Now.Day.ToString + "/" +
Now.Year.ToString + "#" 
Session("MyDatum") = Datum 
DropDownList1.SelectedItem.Value = Now.Year 
DropDownList1.SelectedItem.Text = Now.Year 
DropDownList2.SelectedItem.Value = Now.Day 
DropDownList2.SelectedItem.Text = Now.Day 
DropDownList3.SelectedItem.Value = Now.Month 
Select Case Now.Month 
Case 1 
MonatVolltext = "Januar" 
Case 2 
MonatVolltext = "Februar" 
...
Case 12 
MonatVolltext = "Dezember" 
Case Else 
End Select 
DropDownList3.SelectedItem.Text = MonatVolltext 
End If 
End Sub 

Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click 
Datum = "#" + DropDownList3.SelectedItem.Value + "/" +
DropDownList2.SelectedItem.Value + "/" +
DropDownList1.SelectedItem.Value + "#" 
Session("MyDatum") = Datum 
End Sub 
End Class



******************* 
temperatur_svg.aspx 
******************* 

<?xml version="1.0" standalone="no"?> 
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" 
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";> 

<% @Page Language = "vb" %> 
<% @Import Namespace = "System.Data" %> 
<% @Import Namespace = "System.Data.OleDb" %> 

<script runat = "server" > 
...
Dim Datum as String 
...

Sub ReadFromDatabase() 
Datum = Session("MyDatum") 

Dim ConnStr As String 
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" 
ConnStr &= "Data Source=C:\temp\WebApplication2\temperatur.mdb;" 
Dim myOleDbConn As New OleDbConnection(ConnStr) 
myOleDbConn.Open() 

Dim SQL As String = "SELECT * FROM temperatur WHERE (((temperatur.datum)
=" + Datum + "));" 
Dim myOleDbCmd as New OleDbCommand(SQL, myOleDbConn) 
...

Sub Page_Load(sender As Object, e As EventArgs) 
ReadFromDatabase 
End Sub 
</script> 
...
<svg width="480" height="395"> 
<!-- black and white rectangles --> 
<rect x="0" y="0" width="480" height="395" 
fill="black" stroke="black" stroke-width="0"/> 
...
________________________________________________________________________
______
Werden Sie kreativ! Jetzt HTML-Mails nicht nur schreiben - nein -
GESTALTEN, bei WEB.DE FreeMail!
http://freemail.web.de/features/?mc=021141

_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net

_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an