I've an doubt regarding this coding.i am not getting for conversion of windowsapplications [Resolved]

Posted by Sudheep.grandhe under C# on 10/18/2011 | Points: 10 | Views : 1269 | Status : [Member] | Replies : 4
Hi,

I've an doubt regarding this coding.i am not getting idea.how can i convert this coding into windows applications.please do the needful.


protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = (DataTable)Session["alldata"];
GridView1.DataSource = dt;
GridView1.DataBind();
}

Best,
Sudheep.



Responses

Posted by: Hmanjarawala on: 10/18/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
As windows application are statefull didn't need to use session. and write down following code whenever you fetch data to datatable:
DataGridView1.DataSource = dt.DefaultView

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 10/18/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
just write down:

catch(SqlException)
{

}

remove ex

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 10/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

In my coding i got the warning in catch block.it was shown below.please find.please do the needful.i am underlying the warning part.
Warning1:-The variable 'ex' is declared but never used


catch (SqlException ex )
{


}

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mittaikariss on: 10/18/2011 [Member] Bronze | Points: 25

Up
0
Down
catch(Exception ex)

{
Messagebox.Show(ex.Message);
}



This Message box display all logical errors
and also session only using web Application Window application using Delegates.....

http://www.invomtech.com/

....sundarsowmia....

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response