C # Namespace / Class in Visual Studio Html Native Mode

Is there a way to create a namespace alias in the .aspx file (and not in the .aspx.cs code).

For example ... in a file with a codename, you can create an alias as follows:

using MyPanel = System.Web.UI.WebControls.Panel;

In html source mode (Visual Studio), the namespace can be imported as follows:

<%@ Import Namespace="System.Web.UI.WebControls" %>

I need to do the following:

<%@ Import Namespace="MyPanel = System.Web.UI.WebControls.Panel" %>

EDIT / UPDATE: Obviously this does not work. Is this possible in some other way without using code? Yes, it really works if you remove the space (hint for @Alex hat below). Example:

<%@ Import Namespace="MyPanel=System.Web.UI.WebControls.Panel" %>
+3
source share
2 answers

, . . ASPX , :

<%@ Import Namespace="MyPanel=System.Web.UI.WebControls.Panel" %>

>

+7

contol : theetat UITest, , :

Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException: . , . , , :

Mouse.Click( System.Drawing.Point(sentControl.BoundingRectangle.Width/2 + sentControl.BoundingRectangle.X,  sentControl.BoundingRectangle.Height/2 + sentControl.BoundingRectangle.Y));

"sentControl" - , . SendKeys ( "mystuff" ) .

0

Source: https://habr.com/ru/post/1716470/


All Articles