Link to home
Start Free TrialLog in
Avatar of BeginningWebDesign
BeginningWebDesign

asked on

Get value from aspx page and use in ascx page

Hi
Can any tell me how to do the following.

I have a variable strTest = "A" in an aspx page
I want to retrieve the value of strTest in an ascx page and put the value into a variable called strRetrievedTest.

can anyone tell me how to do that.

Thanks
Caz
ASKER CERTIFIED SOLUTION
Avatar of alpesh_mca
alpesh_mca
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BeginningWebDesign
BeginningWebDesign

ASKER

Hi Alpesh

Hope you had a good new year, I've tried your code and cannot get the ascx page to work.

This is my section of code.
I assumed that a master page would react the same as a ascx page, but I must me wrong.

public partial class header_header : System.Web.UI.MasterPage
{
   
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

Regards
Caz