Click here to Skip to main content
15,886,518 members

Comments by Siddhesh Patankar (Top 22 by date)

Siddhesh Patankar 13-Jul-13 1:45am View    
Just check the logic the SQl query will check if the username password pair is present or not... if present it will return rows else no. then you can compare the types. I guess if that doesnt work you will have to debug the code to find out what results you are getting. First put a break point on DataReader to check if the query is giving out any output or not
Siddhesh Patankar 12-Jul-13 4:06am View    
Does the data source you have related with the Gridview has a Column with Heading Course?? First Check that, as you have to specify the exact column name in this case.
What are you using DataTable or DataSet to populate the GridView?? Judging by the error I am guessing DataTable
Siddhesh Patankar 10-Jul-13 8:25am View    
Just check I have updated the answer
Siddhesh Patankar 10-Jul-13 6:36am View    
Replace Input tag with a Link Button
<asp:LinkButton ID="btnDeleterepNotes" runat="server" CommandType="Del">Delete </asp:LinkButton >
Raise an event of repeater OnRowCommand you can do that by going to the design view clicking on the repater control and clicking on the Lighting type button on the top of properties window.
There you will find a list of controls for the repeater. Click in the Double click on the Onrowcommand and you will be redirected to the code page

Here Inside that event write following code

if(e.CommandType == "Del")
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString= [Your Connection String];
conn.Open();
SqlCommand cmd = new SqlCommand(conn);
cmd.CommandType= CommandType.Text;
cmd.CommandText = [SQL DELETE STATEMENT HERE];
cmd.ExcecuteNonQuery();
conn.Close();
Response.Redirect("[Your Page]");
}

Actually there are many ways to do but this is the basic one. I dont mean to be rude but you basic are not clear. :)
Siddhesh Patankar 10-Jul-13 4:53am View    
Can you post a new question with the code you have used both .aspx page and code page. I'll have no idea what you want unless I see your code. Considering this question has been solved by you.