Jump to content

narayana_anthati

Members
  • Posts

    24
  • Joined

  • Last visited

narayana_anthati's Achievements

Newbie

Newbie (1/7)

0

Reputation

  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
×
×
  • Create New...