You must Sign In to post a response.
  • Category: .NET

    How to clear label control

    Hi

    In my code in c#.

    Response.OutputStream.Write
    after label clear
    lbl1.text="";

    But after this line invoked in my page
    Response.OutputStream.Write

    after noting action in my page so i canot my label

    how to clear my label control after this command
    Response.OutputStream.Write
  • #768436
    Hi,

    Did you try the textbox clear method?
    We can clear any kind of objects which are assigned to the textbox using the clear method, That will clear the completely and also perform the Clear Cache operation which the destructor do.


    If IsNumeric(textBox1.Text) = False Then
    textBox1.Clear()
    End If



    This will clear the object whatever. So kindly check this function is deleting.

    Thanks,
    Mani

  • #768441
    Hi,
    Try to set

    lbl1.Text= ""

    before line

    Response.OutputStream.Write()

  • #768447
    Hi,

    You have to clear your controls before Response.OutputStream, as per architect nothing is executed after Response.OutputStream, so we have to done our job before itself.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments