Click here to Skip to main content
15,891,657 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem in session Pin
J4amieC3-Mar-09 1:18
J4amieC3-Mar-09 1:18 
AnswerRe: Problem in session Pin
JMummery3-Mar-09 2:54
professionalJMummery3-Mar-09 2:54 
QuestionIFrame Window Event Pin
Member 34533313-Mar-09 0:07
Member 34533313-Mar-09 0:07 
Questionerror running asp page Pin
lost_in_code2-Mar-09 23:43
lost_in_code2-Mar-09 23:43 
AnswerRe: error running asp page Pin
JMummery3-Mar-09 2:45
professionalJMummery3-Mar-09 2:45 
GeneralRe: error running asp page Pin
lost_in_code4-Mar-09 21:42
lost_in_code4-Mar-09 21:42 
GeneralRe: error running asp page Pin
JMummery5-Mar-09 10:15
professionalJMummery5-Mar-09 10:15 
Questionpopulate GridView with stored procedure Pin
foryou2-Mar-09 23:35
foryou2-Mar-09 23:35 
HI!


I do not know how to populate my GridView with stored procedure I have this code but it doesn't works she returned result or error message
public void BindData()
   {
       SqlConnection myConnection = new SqlConnection(ConnectionString);

       SqlCommand myCommand = new SqlCommand("PS_NV2", myConnection);
       myCommand.CommandType = CommandType.StoredProcedure;
       SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand);
       DataSet ds = new DataSet();
       myAdapter.Fill(ds, "TAble");
       myConnection.Open();
       myCommand.ExecuteNonQuery();
       GridView2.DataSource = ds;
       try
       {
          GridView2.DataBind();
       }
       catch
       {
           GridView2.PageIndex = -1;
           GridView2.DataBind();
       }
       myConnection.Close();




correct me please.Thanks
AnswerRe: populate GridView with stored procedure Pin
Satish Mahapatra2-Mar-09 23:56
Satish Mahapatra2-Mar-09 23:56 
QuestionRe: populate GridView with stored procedure Pin
foryou3-Mar-09 0:50
foryou3-Mar-09 0:50 
AnswerRe: populate GridView with stored procedure Pin
Satish Mahapatra3-Mar-09 0:57
Satish Mahapatra3-Mar-09 0:57 
GeneralRe: populate GridView with stored procedure Pin
foryou3-Mar-09 1:22
foryou3-Mar-09 1:22 
GeneralRe: populate GridView with stored procedure Pin
Satish Mahapatra3-Mar-09 1:33
Satish Mahapatra3-Mar-09 1:33 
GeneralRe: populate GridView with stored procedure Pin
foryou3-Mar-09 2:05
foryou3-Mar-09 2:05 
Questioncomparig password with the password in database Pin
rosae6192-Mar-09 21:30
rosae6192-Mar-09 21:30 
AnswerRe: comparig password with the password in database Pin
Christian Graus2-Mar-09 21:35
protectorChristian Graus2-Mar-09 21:35 
GeneralRe: comparig password with the password in database Pin
rosae6192-Mar-09 22:23
rosae6192-Mar-09 22:23 
Generalcomparing password with the password in database Pin
sudheera p3-Mar-09 0:29
sudheera p3-Mar-09 0:29 
GeneralRe: comparig password with the password in database Pin
Christian Graus3-Mar-09 9:18
protectorChristian Graus3-Mar-09 9:18 
QuestionGrid view? Pin
Karthick_gc2-Mar-09 21:12
Karthick_gc2-Mar-09 21:12 
AnswerRe: Grid view? Pin
Christian Graus2-Mar-09 21:13
protectorChristian Graus2-Mar-09 21:13 
GeneralRe: Grid view? Pin
Karthick_gc2-Mar-09 21:29
Karthick_gc2-Mar-09 21:29 
GeneralRe: Grid view? Pin
Christian Graus2-Mar-09 21:33
protectorChristian Graus2-Mar-09 21:33 
GeneralRe: Grid view? Pin
Karthick_gc2-Mar-09 21:36
Karthick_gc2-Mar-09 21:36 
Question[Message Deleted] Pin
aratireddy2-Mar-09 21:08
aratireddy2-Mar-09 21:08 

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.