Thank you.....It worked......I had not seen that....
Sanjeev
Thank you.....It worked......I had not seen that....
Sanjeev
Hi, I am using a DataList Control using ASP.NET 2.0... I am getting the following error... NEWLINE IN CONSTANT..... I do not know what's wrong, can anyone help...........Here is the code. Thanks
<%#DataBinder.Eval(Container.DataItem, "summary") %>
<%# DataBinder.Eval(Container.DataItem, "title")%>
<%#DataBinder.Eval(Container.DataItem, "rating")%>
<%# DataBinder.Eval(Container.DataItem, "reviewer") %>
Sanjeev
Hi, It looks like you have problem with naming... If you hit Enter Button....Logout Button should never perform any action and vice versa.... Please check the event handling.. hope it works. Happy Programming.
Sanjeev
Hi, If in the web.config file, you set authentication to Forms and LoginUrl to Login.aspx....and authorization deny users "?" ......Then client cannot go to other page without first going to Login.aspx. Hope helped. Happy Programming.
Sanjeev
Hi, Are you using Forms Authentication???.........If you go and check forms authentication you should be able to do this.... Good luck Happy Programming
Sanjeev
Hi, I am trying to put picture in GridView from SQL Server 2000 Database using Employees Table. I am using ASP.NET 2.0.. I created typed dataSet selecting all columns. Among all columns, one of them is picture column...... I tried with ImageBound column, it did not work...... Can anyone help please.. Thanks
Sanjeev
I think, you need to creat typed DataSet to work with Table Adpater programmtically ........which will be generated code... Sonny... Sanjeev
In ASP.NET 1.1, from by BusinessLayer(a class library project), I used to get Connection string as : string dsn =ConfigurationSettings.AppSettings["connection"]; and pass to DataAccessLayer(DAL). It worked. On 2.0, if I used the previous one, it warns saying it is obsolete. If I put connection string in , they have new settings..... like this: string dsn = ConfigurationManager.ConnectionString["connection"]; It gives me error. Moreover, I cannot get ConfigurationManager class from my Business Layer. How should I pass connection string from BusinessLayer to DAL using ConfigurationManager. Please reply.... Thanks. Sanjeev
Hi Christian, Thank you for you reply. I am sorry but I did not understand the reply...... The issue is deleting any row from the grid when gridview is shown in the page. I am trying to programmatically call the delete with code behind. Thank you, Sanjeev. Sanjeev
Here is the code from ASP.NET 1.1 that works. My problem is below with 2.0 GridView? private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { int playerID = Convert.ToInt32(e.Item.Cells[1].Text); string sqlDelete = "delete Players where PlayerID = '" + playerID +"'"; SqlConnection conn = new SqlConnection(dsn); SqlCommand cmd = conn.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = sqlDelete; conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); DataGrid1.EditItemIndex = -1; BindGrid(); } This above code is ASP.NET 1.1 code for Deletion from DataGrid. It works fine. Now, I am using GridView (ASP.NET 2.0) The problem I am having is getting the playerID from GridView? ***int playerID = Convert.ToInt32(e.Item.Cells[1].Text); ** does not give any playerID but throws error? How do I get the playerID from GridView. Is the event handler Row Deleting or Row Deleted? Please help............. Sanjeev
Try this...... go to Datagrid property builder.. select the Bound column for ID and set its Text Field as Mr or Ms but DataField as ID should work
Sanjeev
Thanks for you immediate reply........ Here is the error !!! 'System.Web.UI.WebControls.GridViewDeleteEventArgs' does not contain a definition for 'Item' How do I retrieve PlayerID from the GridView? Thanks
Sanjeev
Here is the code from ASP.NET 1.1 that works. My problem is below with 2.0 GridView? private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { int playerID = Convert.ToInt32(e.Item.Cells[1].Text); string sqlDelete = "delete Players where PlayerID = '" + playerID +"'"; SqlConnection conn = new SqlConnection(dsn); SqlCommand cmd = conn.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = sqlDelete; conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); DataGrid1.EditItemIndex = -1; BindGrid(); } This above code is ASP.NET 1.1 code for Deletion from DataGrid. It works fine. Now, I am using GridView (ASP.NET 2.0) The problem I am having is getting the playerID from GridView? ***int playerID = Convert.ToInt32(e.Item.Cells[1].Text); ** does not give any playerID but throws error? How do I get the playerID from GridView. Is the event handler Row Deleting or Row Deleted? Please help............. :confused: -- modified at 16:34 Wednesday 27th September, 2006
Sanju