Click here to Skip to main content
15,883,901 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Logout? Pin
Karthick_gc9-Mar-09 23:04
Karthick_gc9-Mar-09 23:04 
QuestionChinese text Pin
GangadharMG9-Mar-09 21:08
GangadharMG9-Mar-09 21:08 
AnswerRe: Chinese text Pin
N a v a n e e t h9-Mar-09 21:50
N a v a n e e t h9-Mar-09 21:50 
AnswerRe: Chinese text Pin
BalasubramanianK9-Mar-09 21:53
BalasubramanianK9-Mar-09 21:53 
AnswerRe: Chinese text Pin
Jarek Kruza9-Mar-09 21:57
Jarek Kruza9-Mar-09 21:57 
Questiontoolbox Pin
balapdy9-Mar-09 19:45
balapdy9-Mar-09 19:45 
AnswerRe: toolbox Pin
anujbanka17849-Mar-09 19:55
anujbanka17849-Mar-09 19:55 
Questionretrieve data from Database based on SessionID and populating the textboxes.. [modified] Pin
scar_face9-Mar-09 19:03
scar_face9-Mar-09 19:03 
had posted this yesterday but since my ques wasnt proper didnt get many answers..well i want populate my textboxes based on the sessionid with data from database..through that id am populating the textboxes which are the fields in the table..am using datareader's reader method but havin problem..do help..below is the code..
if (Session["User"] == null) Response.Redirect("Default4.aspx");
 filltrans(System.Convert.ToString(Session["User"]));
private void filltrans(string User)
    {
        try
        {
            SqlDataReader reader;
            string ConnectionString="...";            
            SqlConnection con = new SqlConnection(ConnectionString);
            con.Open();
            SqlCommand cmd = new SqlCommand("View", con);
           
            cmd.CommandType = CommandType.StoredProcedure;
            SqlParameter[] userdetail = new SqlParameter[1];
            userdetail[0] = new SqlParameter("@User_ID", SqlDbType.VarChar,50);
            userdetail[0].Value = User.ToString();
            
            reader = cmd.ExecuteReader();
            while(reader.Read())
            {
                txtuser.Text = System.Convert.ToString(reader["user"]);
                txtusername.Text = System.Convert.ToString(reader["user_new"]);
                txtmobileno.Text = reader["MobileNo"].ToString();
            }
            reader.Close();
        }
        catch (Exception ex)
        {
                  
        }
    }

when i compile and check with breakpoints i found that after the executeReader method its not goin into while loop at all..
thanks..

scarface

modified on Tuesday, March 10, 2009 1:10 AM

AnswerRe: retrieve data from Database based on SessionID and populating the textboxes.. Pin
Anurag Gandhi9-Mar-09 19:35
professionalAnurag Gandhi9-Mar-09 19:35 
GeneralRe: retrieve data from Database based on SessionID and populating the textboxes.. Pin
scar_face9-Mar-09 19:42
scar_face9-Mar-09 19:42 
QuestionImages not displaying in IIS7 [modified] Pin
Member 34269369-Mar-09 10:59
Member 34269369-Mar-09 10:59 
AnswerRe: Images not displaying in IIS7 Pin
Curtis Schlak.9-Mar-09 12:50
Curtis Schlak.9-Mar-09 12:50 
GeneralRe: Images not displaying in IIS7 Pin
Member 34269369-Mar-09 12:52
Member 34269369-Mar-09 12:52 
AnswerRe: Images not displaying in IIS7 Pin
N a v a n e e t h9-Mar-09 15:47
N a v a n e e t h9-Mar-09 15:47 
GeneralRe: Images not displaying in IIS7 Pin
Member 342693610-Mar-09 5:19
Member 342693610-Mar-09 5:19 
AnswerRe: Images not displaying in IIS7 Pin
Cybernate11-Mar-09 6:51
Cybernate11-Mar-09 6:51 
GeneralRecord Audio Pin
Paul R Morrison9-Mar-09 10:33
Paul R Morrison9-Mar-09 10:33 
GeneralRe: Record Audio Pin
Christian Graus9-Mar-09 11:08
protectorChristian Graus9-Mar-09 11:08 
NewsPage event order: Please critique this info Pin
Gregory Gadow9-Mar-09 7:04
Gregory Gadow9-Mar-09 7:04 
GeneralRe: Page event order: Please critique this info Pin
Anurag Gandhi9-Mar-09 19:50
professionalAnurag Gandhi9-Mar-09 19:50 
QuestionHttpException The file '/MyControls/Web/GUI/Controls/PageHead.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) Pin
thomasa9-Mar-09 6:49
thomasa9-Mar-09 6:49 
AnswerRe: HttpException The file '/MyControls/Web/GUI/Controls/PageHead.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) Pin
Christian Graus9-Mar-09 11:48
protectorChristian Graus9-Mar-09 11:48 
QuestionCreate random Number Pin
ptvce9-Mar-09 3:20
ptvce9-Mar-09 3:20 
AnswerRe: Create random Number Pin
Abhijit Jana9-Mar-09 3:28
professionalAbhijit Jana9-Mar-09 3:28 
GeneralRe: Create random Number Pin
scottgp9-Mar-09 5:09
professionalscottgp9-Mar-09 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.