User1580727775 posted
hi,
If i am not wrong you are trying to dynamically adding a control to your page.
But i could not get your point clearly.
You mentioned that you wan to add the controls in the file App_Code/BAL/Ads.cs.
So,is Ads.cs is only a .cs file ?
Then how can you add a control to a cs file?It is not possible.
What you have to do is ,you need to add controls in some web form.
So in the web form code behind you can add code like this,
protected vois Page_Load(object sender,EventArgs e)
{
TextBox txt=new TextBox();
txt.Text="Happy New Year";
form1.Controls.Add(txt);
}
The above code will dynamically add the control to the page.
Hope to hear from you.
Plz mark as answer if you have got your sollution.