ASP.NET dynamic change CSS

xiaoxiao2021-03-06  45

In ASP.NET, sometimes it is necessary to dynamically transform CSS, such as sometimes personalized page, can do this

After that, use the following code in the page to replace the CSS.

SUB Page_Load (Sender As Object, E as Eventargs)

IF not (ispostback)

MyStylesheet.attributes.add ("href", "/ css / flostyle.css")

END IF

End Sub

1. String string to assign the initial value of the initial value:

String var = string.empty;

2. During the writing code, partial code segment is folded together, thereby convenient reading:

#Region the Test Code

#ndregion includes including the code

3. Clear all the child controls in the container control of the server side:

Such as: ASP: PANEL ----- panel1.controls.clear ();

DataGrid is not scrolling, it is actually very simple, only need:

actually using CSS attributes

转载请注明原文地址:https://www.9cbs.com/read-84112.html

New Post(0)