demouser743
Posts
-
On Questions I am seeing 4hrs ago where as when I open it shows the correct time -
Gridview problemHi all, I am designing my program like this. I am having a text box, button and a grid view on my page. When i entered some value in text box and click on button the value is binding to grid view. In the grid view i am having only one field as Name and option as select. When i click on select i am displaying the corresponding user in the text box. What i need is if i edit the text on the text box and click on the same button again the value should replace the old one. Example TextBox ----------- Button Gridview Name Dora select Xyz Select When i click on select at xyz i am displaying it in text box. If i would like to replace it with some name like ABC what to do.. Please help me..
-
Login page when edit clicked in Gridviewusing System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["Loginerrors"] = 0; } } private bool validate(String Uname, String Pwd) { bool val = false; SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["sqlcon"].ToString()); string qry = "Select Uname, Pwd FROM login"; SqlCommand cmd = new SqlCommand(qry, con); SqlDataReader dr; con.Open(); dr = cmd.ExecuteReader(); while (dr.Read()) { if ((Uname == dr["Uname"].ToString()) & (Pwd == dr["Pwd"].ToString())) { val = true; } dr.Close(); return val; } return val; } protected void Login1_Authenticate(object sender, EventArgs e) { if (validate(Login1.UserName,Login1.Password)) { Login1.Visible = false; Label1.Text = "Success"; } else { Label1.Text = "Failed"; } } } Is this code efficient for login
-
Login page when edit clicked in GridviewHey i just write it for sample. I know form authentication and other . Please provide me what to do after log in success.
-
Login page when edit clicked in GridviewJust a basic login like this protected void Button1_Click(object sender, EventArgs e) { SqlConnection Con = new SqlConnection(ConfigurationManager.AppSettings["sqlcon"]); SqlCommand cmd = new SqlCommand(); cmd.Connection = Con; string sql; sql = "Select *from login where uname='" + TextBox1.Text + "' and pwd='" + TextBox2.Text + "'"; cmd.CommandText = sql; Con.Open(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { Response.Redirect("Default.aspx"); } }
-
Login page when edit clicked in GridviewCan i have the sample code
-
Login page when edit clicked in GridviewHi all i need a small help regarding gridview. I will show some information on loading a page. When ever a user clicks on Edit or delete it should redirect to a login page. Only the login user can edit or delete the data. How can i do this.
-
Event CalendarHello one and all, I need a small requirement. I am developing an application with calendar on my from. What i need is i would like to display the holidays on the particular day itself. Like on January 1st it should show New year and for December 25th Christmas like that. I write a code but it's displaying only for that year. How to make it count for every year. Please help... Dorababu
-
Grid ViewCan i have this in English please...
-
Grid ViewDear one and all, My grid view looks as follows Course name Course Id Faculty Select User ----------------------------------------------------------------------- ASP Asp101 XYZ Edit/Assign | ----------------------------------------------------------------------- C# C#101 ABC Edit/Assign | ------------------------------------------------------------------------ and so on What i need is when i click on assign i will redirect to another page there i will display all student names in a grid view as follows Student name Student Email Registered Courses Options -------------------------------------------------------------------------------- Abc abc@gmail.com reg Checkbox ------------------------------------------------------------------------------------ Abc abc@gmail.com reg Checkbox ------------------------------------------------------------------------------------ and so on .. For this i need to write
-
how can hide the grid view dataHey i just posted that if in your project if you don't need any template go to the source part there you can edit your Grid view
-
how can hide the grid view dataJust Dont define it in the grid view means u will have a code like this remove those according to your requirement
-
Replacing the Old File With Newly Uploaded FileCan you tell what to do actually my code is like this <ItemTemplate> <asp:LinkButton ID="Link1" runat="server" Text='<%# Bind("filename") %>' ></asp:LinkButton> </ItemTemplate> So can you tell what to do here
-
Replacing the Old File With Newly Uploaded FileHello one and all, I am having small requirement. I am having some data stored in SQL DB. I am displaying that data in a grid view as follows Id Name Filename 1 Dorababu dora.doc 2 Khan khan.pdf 3 XYZ XYZ.jpg all these filenames are displayed in link button inside grid view. What i need is when i click on particular name like .oc or .pdf or .jpg i would like to get the following thing as Open Save Cancel as we get when we are downloading an attachment from mail. Can an one give me the code for my requirement please. Thanks in Advance, M.Dorababu