Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sessions in .aspx and .cs

Status
Not open for further replies.

maneland

Programmer
Mar 24, 2006
24
ES
Hi:

I´m modifying a project already done and I can´t get the .cs files, just the .dll file. When I try to get the session in the aspx files I need to use this: Proyecto.Internacional.Idioma.idioma, but this sentence is not posible to use in the new .cs files.

I´m trying to use Page.Session["idioma"].ToString() in the .cs file but I can't. I suppouse I need to include the Juniper.dll file. Does it correct?. How can I get the session Proyecto.Internacional.Idioma.idioma in the .cs files?

Example:

.aspx file

<%@ Register TagPrefix="Proyecto" Namespace="Proyecto.MasterPages" Assembly="MasterPages" %>
<%@ Page language="c#" Codebehind="default.aspx.cs" Debug="true" AutoEventWireup="false" Inherits="thumbsnails._default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
</HEAD>
<body MS_POSITIONING="GridLayout">
<Proyecto:MASTERPAGE id="MPContainer" runat="server">
<%= Response.Write(Proyecto.Internacional.Idioma.idioma) %>
...

In the <%= Response.Write(Proyecto.Internacional.Idioma.idioma) %> sentence i can get the session.

The .cs file

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace thumbsnails
{

public class _default : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
//** Internacionalizacion de la aplicacion
Response.Write(Proyecto.Internacional.Idioma.idioma);
...

I would like to show the Proyecto.Internacional.Idioma.idioma in the .cs file too.


How?
Thanks in advance
 
what is Proyecto.Internacional.Idioma.idioma?

session is NOT dll dependent, its application dependent,

therefore if the value is in session then
Session["idioma"].ToString()

must work...


Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top