Muchas gracias por su respuesta.
Instale lo que me dijiste y no me salio el mesnaje de error.
Ahora tengo otro mensaje de error,
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'UsersBLL' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 17: if (Request.IsAuthenticated)
Line 18: {
Line 19: UsersBLL user = new UsersBLL();
Line 20:
Line 21:
Source File: c:\inetpub\wwwroot\Walt\Default.aspx.cs Line: 19
He stado leyendo que puede ser que no tuviera importado un paquete o que estuviera mal escrito.
Realmente no tengo muy claro a que se debe el error ya que solo llamo desde ahi a ese tipo de usuarios.
Dejo el codigo para que os quede mas claro.
Codigo:
Código C#:
Ver originalusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.IsAuthenticated)
{
UsersBLL user = new UsersBLL();
string a = user.getUsersByUser_Name(User.Identity.Name).Rows[0]["user_type"].ToString();
int b = (int)user.getUsersByUser_Name(User.Identity.Name).Rows[0]["id_user"];
if (a.CompareTo("log")==0)
{
WelcomeBackLogistics.Text = "Welcome back, " + User.Identity.Name + " , Logistics";
// Toggle Menus
PanelLog.Visible = true;
PanelWar.Visible = false;
AnonymousMessagePanel.Visible = false;
// Keep user data into a Session variable
Session["user_type"] = "log";
Session["id_user"] = b;
}
else if (a.CompareTo("war")==0)
{
WelcomBackWarehouse.Text = "Welcome back, " + User.Identity.Name + ", Warehouse";
// Toggle Menus
PanelLog.Visible = false;
PanelWar.Visible = true;
AnonymousMessagePanel.Visible = false;
// Keep user data into a Session variable
Session["user_type"] = "war";
Session["id_user"] = b;
}
}
else
{
AnonymousMessagePanel.Visible = true;
PanelLog.Visible = false;
PanelWar.Visible = false;
}
}
}
mUCHAS GRACIAS DE NUEVO.
uN SALUDO