Jump to content

narayana_anthati

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by narayana_anthati

  1. Can u explain clearly.I am not getting u r problem Exatlt.Any how i am sending some code verify this.This is in c#.SqlDataReader dr; s = "select * from ProductDetails where ProductId='" + r + "' "; SqlCommand cmd = new SqlCommand(s, conn); conn.Open(); cmd.Connection = conn; dr = cmd.ExecuteReader(); while (dr.Read()) { TextBox1.Text = dr[0].ToString(); TextBox2.Text = dr[1].ToString(); TextBox4.Text = dr[3].ToString(); TextBox5.Text = dr[4].ToString(); TextBox6.Text = dr[5].ToString(); TextBox7.Text = dr[7].ToString(); TextBox8.Text = dr[8].ToString(); DropDownList1.Text = dr[9].ToString(); TextBox9.Text = dr[10].ToString(); } }If it is not help full plz send u r code i will see that one. RegardsNarayana
  2. Hai ,Just bind data to the text as below and write the the query string of which u r requesting in the form load<asp:HyperLink id="hyp" Text ='<%#DataBinder.Eval(Container.DataItem,"categorylist") %>' runat ="server" > </asp:HyperLink>This the format if u have any doubts plz let me knowRegardsNarayana
  3. Hai , Here i am sending some sample code.Retriving images from database to datagird by appropriate path. SqlConnection conn = new SqlConnection("Data Source=sqlserver;Initial Catalog=OmArtPrint;Integrated Security=True"); DataSet ds = new DataSet(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindGrid(); } } private void bindGrid() { cid1 = Request.QueryString["cid"].ToString(); try { conn.Open(); String sqlstmt = "select pid,ProductList,Price,ProdDesc,Prodimglink from productlist SqlDataAdapter myda = new SqlDataAdapter(sqlstmt, conn); myda.Fill(ds); datagrid1.DataSource = ds; datagrid1.DataBind(); conn.Close(); } catch (Exception ex) { Response.Write(ex.Message.ToString()); }And Html Code <asp:DataGrid ID="datagrid1" runat ="server" AutoGenerateColumns ="False" Width="557px" CellPadding="4" ForeColor="#333333" GridLines="None" Height="147px" style="color: black" AllowPaging="True" HorizontalAlign="Center" > <Columns > <asp:TemplateColumn HeaderText ="details"> <ItemTemplate > <img src='<%#DataBinder.Eval(Container.DataItem, "Prodimglink")%>' ID="ProdImage" name="1" runat=server /> </ItemTemplate> </asp:TemplateColumn> <asp:BoundColumn DataField ="Pid" HeaderText ="Pid"></asp:BoundColumn> <asp:BoundColumn DataField ="ProductList" HeaderText ="ProductLIst"></asp:BoundColumn> <asp:BoundColumn DataField ="Price" HeaderText ="Price"></asp:BoundColumn> <asp:BoundColumn DataField ="ProdDesc" HeaderText ="ProductDesc"></asp:BoundColumn> </Columns> </asp:DataGrid>
  4. Hai EveryBody , Can anybody Help me Regarding Paging Concept in DataList Control.I have done some coding to get page numbers but how to fix ,how many elements in a row and column,and how to break to next page to display.PlzThanks in advanceRegardsnarayana
  5. Hai every one, Can any body help me how i can upload an image into a folder.Can any body give suggestions.plz.Thanks inadvance,Regardsnarayana
  6. Thanks now it workingRegardsnarayana
  7. If any body having sample code plz send me its very urgent or plz rectify my problem please.Regardsnarayana
  8. Hai, It is not giving any error but but when we click the update button it just coming back as before with out any updation.If ypu have any code please send me it's very urgent.Regardsnarayana
  9. Hai , I got problem with updation of datagrid.It editing but when we press update it is not working.Plz Help me it's very urgent.Thanks in advance.Here i am sending my code:protected void datagrid1_UpdateCommand(object source, DataGridCommandEventArgs e) { System.Web.UI.WebControls.TextBox cName = new System.Web.UI.WebControls.TextBox(); cName = (System.Web.UI.WebControls.TextBox)e.Item.Cells[2].Controls[0]; SqlCommand mycommand = new SqlCommand("SP_Updatecategorylist", conn); mycommand.CommandType = CommandType.StoredProcedure; mycommand.Parameters.Add(new SqlParameter("@categorylist", SqlDbType.NVarChar, 50)); mycommand.Parameters["@categorylist"].Value = cName.Text; conn.Open(); mycommand.ExecuteNonQuery(); conn.Close(); datagrid1.EditItemIndex = -1; BindData(); }Stored Procedure:CREATE PROCEDURE SP_Updatecategorylist @categorylist nvarchar(50) AS UPDATE categorylist SET categorylist = @categorylist WHERE categorylist = @categorylist;
  10. ok its working thank u Regards narayana
  11. Hai, When i am using Rabge Validator Control for password length.It is giving error as "The MaximumValue 12 cannot be less than the MinimumValue 6 of password"Why it is giving like this plz help me.<asp:RangeValidator ID ="password" runat ="server" ControlToValidate ="tb2" MinimumValue ="6" MaximumValue ="12" Type ="String" ErrorMessage="<small>Minimum of six letters</small>" BackColor="White" BorderColor="White" BorderStyle="Dashed"> </asp:RangeValidator>Regardsnarayana
  12. Thanks for u r reply.from that no problem.But how can i use alert if the user alredy exists.plz send me.In my validation Range validator also not working>plz send me how to work with these two things.Regardsnarayana
  13. Hai every one, i am facing problem on the users creation form.Before creation of validation's it's working.After that it throwing exception as "Thread has been Aborted" and the then it is showing User alredy exits and gowing to successful creation page.Plz help me.My Code Is:SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; try { cmd.CommandText = "insert into login values('" + tb1.Text + "','" + tb2.Text + "','" + ddl1.Text + "','" + tb3.Text + "','" + tb4.Text + "','" + tb5.Text + "','" + tb6.Text + "','" + tb7.Text + "','" + tb8.Text + "','" + tb9.Text + "','" + tb10.Text + "','" + ddl2.Text + "')"; conn.Open(); cmd.ExecuteNonQuery(); tb1.Text = ""; tb2.Text = ""; tb3.Text = ""; tb4.Text = ""; tb5.Text = ""; tb6.Text = ""; tb7.Text = ""; tb8.Text = ""; tb9.Text = ""; tb10.Text = ""; Response .Redirect ("registrationcompleate.aspx"); conn.Close(); } catch (Exception ex) { //Response.Write(ex.Message.ToString ()); MessageBox.Show(ex.Message.ToString()); MessageBox.Show("User Already Exists Choose Different Name", "User"); tb1.Text = ""; } }Thanks in advance;Regardsnarayana
  14. Hai, But it is asking assembly reference.plz send which is refers.regardsnarayana
  15. Hai, Can any body help me.i am new to c#.net.In vb we have message box.Like that how we can use messagebox's in c#.Plz send me it's urgentThanks in advanceRegards,Narayana
  16. Thanks for u reply now its workingRegardsnarayana
  17. Thanks for u reply now its workingRegardsnarayana
  18. Thanks for u reply yes it now working.Regards,narayana.
  19. hai when i am udating data i am facing Error executing child request for Registartion Compleate.But the data is updating.Can any body rectify my problem.code is:public partial class Usersupdate : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } } protected void Button2_Click(object sender, EventArgs e) { tb1.Text = ""; tb2.Text = ""; tb3.Text = ""; tb4.Text = ""; tb5.Text = ""; tb6.Text = ""; tb7.Text = ""; tb8.Text = ""; tb9.Text = ""; tb10.Text = ""; } protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=sankhya03;Initial Catalog=OmArtPrint;Integrated Security=True"); //Dim con As New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("Connection")); SqlCommand cmd=new SqlCommand() ; cmd.Connection = conn; try { cmd.CommandText ="update login set pwd='"+tb2 .Text +"',title='"+ddl1 .Text +"' , firstname='"+tb3.Text +"' , lastname='"+tb4.Text +"' , phone='"+tb5.Text +"' , email='"+tb6.Text +"' , address='"+tb7.Text +"' , city='"+tb8.Text +"' , state='"+tb9.Text +"' , postal='"+tb10.Text +"' , howuheard='"+ddl2 .Text +"' where username='"+tb1.Text +"'"; conn.Open(); cmd.ExecuteNonQuery(); tb1.Text = ""; tb2.Text = ""; tb3.Text = ""; tb4.Text = ""; tb5.Text = ""; tb6.Text = ""; tb7.Text = ""; tb8.Text = ""; tb9.Text = ""; tb10.Text = ""; Server.Transfer("Registartion Compleate"); conn.Close(); } catch(Exception ex) { Response.Write(ex.Message.ToString ()); }}
  20. HaiWhen i am giving indidual connection my application is working.But when a key word from web.config i am getting error.SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Connection"));Where i Bolded in that spot i am getting error.The error is System.Configuration.ConfigurationSettings.AppSettings is a property but it is used as a method.Thanks in advanceRegardsNarayana
  21. hai,When i am binding data to a datagrid i am getting error at this line plz any one help me.datagrid1.DataSource = ds.Tables("categorylist").defaultview;MY TOTAL CODE IS:SqlConnection conn = new SqlConnection("Data Source=sankhya03;Initial Catalog=OmArtPrint;Integrated Security=True"); DataSet ds = new DataSet(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindGrid(); } } private void bindGrid() { try { string sqlstmt = "select * from categorylist where pcid=0"; SqlDataAdapter myda = new SqlDataAdapter(sqlstmt, conn); myda.Fill(ds, "categorylist"); datagrid1.DataSource = ds.Tables("categorylist"); //datagrid1.DataSource = ds.Tables("categorylist"); //datagrid1.DataSource = ds.Tables("categorylist").defaultview; datagrid1.DataBind(); } catch (Exception ex) { Response.Write(ex.Message.ToString()); } }Thanks in advance.its very urgent.Regardsnarayana
  22. Hi, In my application i am getting an error on the query plz help me.i wrote the query as "UPDATE LOGIN(PASSWORD) SET VALUES('"+TEXTBOX3.TEXT+"').If there is any error plz send me.It's very urgent.Thanks in advaneRegards,narayana
  23. narayana_anthati

    Sessions

    Hai, I am new member to this group.Can any body helpme.It is like a shopping cart project.For that i have taken one datalist.there i kept "addto cart" If i press it has to store in shoppingcart page.plz help me this very urgentThanks in advance,Regardsnarayana
×
×
  • Create New...