Im trying to unit test my current project(the code behind) but I can't manipulate the controls inside the content page. Say I want to put some text inside the textbox, where textbox is inside the content page. I tried the accessor but failed, example: MyClass_Accessor acc = new MyClass_Accessor(); acc.textboxUserName.Text = "MyName"; this attempt was not successful it says Object reference not set to an instance of an object... I also tried the page.FindControl("textboxUserName") but failed also.
When I tried to manipulate the controls inside the Master page, it works using page.Master.FindControl("labelTitle").
How to manipulate asp controls inside the content page with unit testing?
Hope you can help me on this.
thanks and best regards,