c# - How to place a programmatically added literal control in the right location in the web page? -


I am adding a literal control on my web page using the following lines of code:

  Little ControlOn MyObject = New Little Control (); MyObject.Text = @ "& lt; Object ID = 'Media Player' WIDTH = '640' HEIGHT = '480' CLASSID = 'clsid: 9BE31822-FDAD-461B-AD51-BE1D1C159921' STANDBY = 'Windows Media Player Component Loading Is ... 'TYPE =' application / x-vlc-plugin '& gt; PARAM name =' filename 'VALUE =' "+" file: /// "+ path +" '& gt; . & lt; / OBJECT & gt; , "; Page.Controls.Add (myObject);   

But it is being added to the bottom of the page, while I want it in the middle, how can I specify this place where I need to keep this control?

With experience, I will enter the literal declaration on your page Set the precise location), then set the control code to text if you do not enter any text, the element will be empty and will not render anything on the page.

On your aspx page, wherever you want to:

  & amp; ATP: Liberal ID = "My Literal" Runat = "Server" />   

In your code:

  myLiteral.Text = "...";   

If you should not see anything, then ignore it. The control will not interrupt the flow of the remaining application.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -