Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ok , i send refernce of page to some class i check in the constrctor if i cant change text box
control and it worked.
object myTxt = pageSender.Page.FindControl("txtPresent");
            if (myTxt != null)
            {
                ((System.Web.UI.WebControls.TextBox)myTxt).Text = "2222";

            }


now the problem
i start a new thred and run it :
web.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(pageLoadedComlited);
            Application.Run();


new in the documet comleted function i tray to change the control and its not work:

void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            object myTxt = pageSender.Page.FindControl("txtPresent");
            if (myTxt != null)
            {
                ((System.Web.UI.WebControls.TextBox)myTxt).Text = e.ProgressPercentage.ToString();

            }
        }


I am able to identify the control But it does not work.
please help
Posted
Comments
Sinisa Hajnal 2-Sep-14 6:19am    
What error do you get?
Member 10631195 2-Sep-14 6:30am    
i dosent get error but the text-box -> text dosent changed
[no name] 2-Sep-14 6:29am    
You are finding a textbox from a page object
Where it is coming from another location, am i right?
So ho can you change the value from here
Member 10631195 2-Sep-14 6:33am    
you You're right but i tray to chage text in the constructor of the class and i succeed
Member 10631195 2-Sep-14 6:38am    
you You're right but i tray to chage text in the constructor of the class and i succeed


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900