Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET Espanol
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET Espanol Esta es una lista de correo dedicada al intercambio de conocimiento sobre ASP.NET en el idioma español.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET Espanol section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 6th, 2006, 02:55 PM
Registered User
 
Join Date: Oct 2006
Location: Newport Beach, , USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problema de atraso en el profile

tengo un problema, estoy usando login control, al mismo tiempo que se firma un usuario nuevo, necesito leer algunos datos de algunas tablas, y el query funciona perfectamente, desafortunadamente al cargar los datos en el profile estan atrasados.

es decir, si se firma el usuario1 al entrar no se carga su nombre, pero el query si funciona, y cuando despues de este usurario firma un usuario2 en este se cargan los datos de usuario1 y asi sucesivamente y en veces no carga los valores necesarios, pero el query jamas me da un error, siempre esta cargando los datos.

como puedo, cargar los datos que me da este qery y guardarlos para su uso en el masterpage y otras paginas posteriores. esto tiene que se en el login.aspx

Gracias

    protected void Login1_LoggedIn(object sender, EventArgs e)
    {
        string userName = Login1.UserName;
        string password = Login1.Password;

        string query1 = @"SELECT Security.SubscriberID, Security.UserTypeID, Subscribers.Lastname + ', ' + Subscribers.Firstname AS Fullname, Subscribers.Medid, Security.registrationnum FROM Security INNER JOIN Subscribers ON Security.SubscriberID = Subscribers.SubscriberID WHERE UserName = @UserName AND Pwd = @Password";
        string conn1 = (string)ConfigurationManager.ConnectionStrings["typhoonConnectionString1"].ConnectionString;
        SqlConnection myconn = new SqlConnection(conn1);
        SqlCommand command = new SqlCommand(query1, myconn);
        command.Parameters.AddWithValue("@UserName", userName);
        command.Parameters.AddWithValue("@Password", password);
        myconn.Open();
        SqlDataReader reader = command.ExecuteReader();
        reader.Read();
        Profile.doctors.subscriberid = (String.Format("{0}", reader[0]));
        Profile.doctors.usertype = (String.Format("{0}", reader[1]));
        Profile.doctors.fullname = (String.Format("{0}", reader[2]));
        Profile.doctors.medid = (String.Format("{0}", reader[3]));
        Profile.doctors.registrationnum = (String.Format("{0}", reader[4]));
        reader.Close();
        myconn.Close();
    }


este es un ejemplo de domo leo despues los datos para ser leidos en el, masterpage.

 LoginName name = (LoginName)LoginView2.FindControl("LoginName1");
        name.FormatString = Profile.doctors.fullname;

Luis



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problema accediendo a un Procedimiento en Oracle Baphomet ASP.NET Espanol 0 September 14th, 2007 04:06 AM
problema con dos tablas en oracle charoluque SQL Language 3 August 14th, 2006 03:18 PM
problema en conexion a oracle jakepc ASP.NET Espanol 0 April 27th, 2005 11:24 AM
Error al registrar dll hecha en vb.net en el COM+. amantona ASP.NET Espanol 0 April 13th, 2004 03:32 AM



All times are GMT -4. The time now is 06:09 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.