How to clear label and textbox controls [Resolved]

Posted by Jayakumars under C# on 12/2/2016 | Points: 10 | Views : 376 | Status : [Member] [MVP] | Replies : 1
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


Mark as Answer if its helpful to you


Responses

Posted by: Rajnilari2015 on: 12/5/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Dear @Jayakumars, you need to do the clearing of the controls before Response.OutputStream.Write. The HttpResponse.OutputStream, enables binary output to the outgoing HTTP content body. So once it is invoked, the current http context is over and henceforth we cannot perform any other operation on the Http objects.
Hope this clarifies.

--
Thanks & Regards,
RNA Team

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response