www.webdeveloper.com
Results 1 to 6 of 6

Thread: if statment with asp.net

  1. #1
    Join Date
    Nov 2010
    Posts
    6

    if statment with asp.net

    hi, this code in page html asp.net

    Code:
    <asp:Label ID="Label6" runat="server"  ForeColor="Red" Font-Bold=true Text=<%# Eval("Service")%>/>
    i need say:

    if (Label6.Text = "admission")
    {
    Label6.Text = "tax"
    }

    i do,t know java script

    please type full code to me.

    thanks in advance
    with my regards

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    var Label6 = document.getElementById('Label6');
    if (Label6.value == "admission")
    {
    Label6.value = "tax";
    }

  3. #3
    Join Date
    Nov 2010
    Posts
    6
    i try but not work

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Use onblur in the control
    Code:
    onblur="if (this.value =='admission'){this.value='tax';}"

  5. #5
    Join Date
    Nov 2010
    Posts
    6
    i try this code but not work please help

    Code:
    <asp:Label ID="Label6" runat="server"  ForeColor="Red" Font-Bold=true Text=<&#37;# Eval("Service")%> onblur="if (this.value =='admission'){this.value='tax';}/>

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Moving to asp forum

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles