Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

strawberrysh

@strawberrysh
About
Posts
53
Topics
38
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • convert .aspx webpage to file.exe
    S strawberrysh

    Hi I have a web project and i build it in VS2005 with asp.net.the page are .aspx. i want to convert in to myproject.exe file that when a user click on it see the web site in a browser and i don't want to put my website on server on internet.i want to ran in with file.exe in my computer .how should i do this work. please help me

    ASP.NET csharp asp-net sysadmin help

  • error in cascading dropdownlist
    S strawberrysh

    how? can you explain me more?

    ASP.NET database wpf wcf help

  • error in cascading dropdownlist
    S strawberrysh

    I try your code,but gave that error again :(

    ASP.NET database wpf wcf help

  • error in cascading dropdownlist
    S strawberrysh

    Hi i have two dropdownlist.i bind somthing to first dropdownlist from database.I want when I select an item from dropdownlist1 see some item in dropdownlist2 .but when i select item from dropdownlist1 ,I give this error. i wrote this code but give error : error: invalid attempt to call FeildCount when reader is cloused for binding item to dropdownlist1 i wrote this code in page load:

    cmd.CommandType = CommandType.StoredProcedure;
    cmd.CommandText = "dbo.StoredProcedure19";
    con.Open();
    SqlDataReader dr = cmd.ExecuteReader();
    if (dr.Read())
    {
    DropDownList1.DataSource = dr;
    DropDownList1.DataTextField = "category_name";
    DropDownList2.DataValueField = "category_id";
    DropDownList1.DataBind();
    con.Close();
    dr.Close();
    }

    in select index change of dropdownlist1

    protected void drse(object sender, EventArgs e)
    {
    SqlConnection con = new SqlConnection(connectionstring);
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = con;

                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.StoredProcedure21";
                cmd.Parameters.AddWithValue("@category\_id", DropDownList1.SelectedItem.Value.ToString());
                con.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    DropDownList2.DataSource = dr;
                    DropDownList2.DataTextField = "type";
                    DropDownList2.DataValueField = "id\_type";
                    DropDownList1.DataBind();
                    con.Close();
                    dr.Close();
                }
    

    }

    ASP.NET database wpf wcf help

  • where is the problem of my code?
    S strawberrysh

    Hi I wrote these code for changing the language of my site.the default language of site is Farsi,and i put two link button in master page for switching the language , and i have two css ,one for Farsi and one for English.when the page load and when i click on en link button ,the language change but the css doesn't change ,I don't know why? in all page except master page i wrote:

    protected override void InitializeCulture()
    {
    if (Session["lang"] != null)
    {
    string selectedlang = Session["lang"].ToString();
    UICulture = selectedlang;
    Culture = selectedlang;
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedlang);
    Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedlang);

        }
        base.InitializeCulture();
    }
    

    in masterpage in click event of link buttons

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
    Session["lang"] = "en-US";
    Server.Transfer(Request.Url.PathAndQuery, false);
    type='text/css' />";

    }
    protected void LinkButton2\_Click(object sender, EventArgs e)
    {
        Session\["lang"\] = "fa-IR";
        Server.Transfer(Request.Url.PathAndQuery, false);
       type='text/css' />";
    }
    

    and in page load of master page:

    protected void Page_Load(object sender, EventArgs e)
    {
    if (!IsPostBack)
    {
    if (Session["lang"] == null)
    {

                this.Literal1.Text = "";
            }
            else
                if (Session\["lang"\].ToString() == "en-US")
                {
                    this.Literal1.Text = "";
                }
                else
                    if (Session\["lang"\].ToString() == "fa-IR")
                    {
                        this.Literal1.Text = "";
                    }
        }
    

    asp:Literal ID="Literal1" runat="server">

    ASP.NET css sysadmin help question

  • [Message Deleted]
    S strawberrysh

    [Message Deleted]

    ASP.NET

  • [Message Deleted]
    S strawberrysh

    [Message Deleted]

    ASP.NET

  • in witch event i shoud write code?(for datalist)
    S strawberrysh

    I have a datalist that as two button in item template.i want to when i click on a button get the id of that row.that type of id is char.in witch event I should write this code.

    ASP.NET question

  • showing item of list in gridview row.
    S strawberrysh

    I have a gridview that in every row of it is a textbox.and i have a generic list.I want to show item of list in textboxes of gidview.for example ,if in list has 4 item like 1,2,3,4 ,and gridview has 7 rows,only 4 row of gridview must be complete.4 textbox in full and 3 textbox are empty.what should i do?

    ASP.NET tutorial question

  • how can I reach to values(text) of to column in gridview with pressing the button of that row?
    S strawberrysh

    Hi I have a gridview with several column.in itemtemplate of this gridview i put a button.one of column is product_id and one of them is a textbox that user input something in it. when user click on button in a row ,how can i get the product_id text and text of that textbox of that row.because i want to remove these values from a list.(I want to get text of that cell) in which event? please help me .thanks

    ASP.NET question help

  • how can I remove an Item from genericlist?
    S strawberrysh

    I have a generic list.how can I remove an item from my list?type of my list is string.

    ASP.NET question

  • storing text of textboxes in list ang show them in textbox again(in gridview)
    S strawberrysh

    the viewstates are true.I want to show text in textboxes agian after postback.

    ASP.NET tutorial

  • storing text of textboxes in list ang show them in textbox again(in gridview)
    S strawberrysh

    I have a gridview that has a column of textbox that users input something in textbox.I want to retrieve text of textboes after postback,so i wrote this code to store texts of textboxes in list and list in a session.but I don't know how to show them agian in textboxes. my code to store text of textboxes:

    protected void Button1_Click(object sender, EventArgs e)
    {
    List qy = new List();
    foreach (GridViewRow gvr in GridView1.Rows)
    {
    TextBox q = (TextBox)gvr.FindControl("textbox5");
    if (Session["quantity"] == null)
    {
    qy.Add(q.Text.Trim());
    Session["quantity"] = qy;
    }
    else
    {
    ((List)Session["quantity"]).Add(q.Text.Trim());
    }
    }

    ----------------------------- and in pageloade i wrote this but I don't know how to continue it:

            if(Session\["quantity"\]!=null)
            {
                List temp=(List)Session\["quantity"\];
                foreach(GridViewRow gvr in GridView1.Rows)
                {
                    TextBox tq=(TextBox)gvr.FindControl("textbox5");
    
    ASP.NET tutorial

  • deleting a row of gridview and the id of product from a list
    S strawberrysh

    Products oProducts = lstProducts.Find(delegate(Products p)

    what is delegate?I did't use product class.here is my code:

    if (Session["basket"] == null)
    {

                    List pid = new List();
                    pid.Add(productid.Trim());
    
                    Session\["basket"\] = pid;
                }
                else
                {
                    ((List)Session\["basket"\]).Add(productid.Trim());
                }
    

    Button btnDelete = (Button)GridView1.Rows[e.RowIndex].FindControl("btnDelete");

    I don't have RowIndex in my smart list.

    modified on Friday, September 5, 2008 3:39 PM

    ASP.NET help

  • deleting a row of gridview and the id of product from a list
    S strawberrysh

    i have a list that I bind it to gridview.in this list I store id of products.my list is in a session..in itemtemplate column of this gridview I put a button , named delete , for deleting every row.i dont bind this gridview to sqldatasource .it binds to a list.the id of product is one of the columns of gridview.I want to when user click this button the id of that product remove from the list .how should I remove thi sid from my list and where should I write code.please help me.here is gridviewsource:

    ASP.NET help

  • how can I correct my code?
    S strawberrysh

    it is in template item.I couldn't understand your meaning in question 2? I used breakpoint but in qty is " ",and the data I intered in textbox wasn't there.

    ASP.NET question debugging

  • how can I correct my code?
    S strawberrysh

    i try the code like you,but i get the same result,(qty is " ") where is my problem?

    ASP.NET question debugging

  • how can I correct my code?
    S strawberrysh

    yes it is textbox2.i am sure.

    ASP.NET question debugging

  • how can I correct my code?
    S strawberrysh

    I write this code for showing totalprice in a gridview footer.when this page loaded user input his quantity on textboxes and press a button,after that must see the total price in gridview footer.here is my click event code:(but when I input something in m textboxes and press the button the total price in footer is 0)I used breakpoint and saw the qty is "".how should I correct my code?

    protected void Button1_Click(object sender, EventArgs e)
    {
    if (GridView1.Rows.Count > 0)
    {
    for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
    {
    TextBox qty = (TextBox)GridView1.Rows[i].FindControl("textbox2");
    Label pr = (Label)GridView1.Rows[i].FindControl("label3");
    float total = 0;
    if (!string.IsNullOrEmpty(qty.Text))
    {
    float qty1 = float.Parse(qty.Text);

                    float pr1 = float.Parse(pr.Text);
                    total = total + (qty1 \* pr1);
                }
                Label t = (Label)GridView1.FooterRow.FindControl("label3");
                t.Text = total.ToString();
            }
    
        }
    
    ASP.NET question debugging

  • loop for store Id in a list
    S strawberrysh

    I want to store Id in a list and list in a session.in another page I want to use these id in a gridview.my code is for shopping cart.

    ASP.NET css
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups