I’m trying to get a Page’s type, to assign it to a div’s id.
I tried:
<div id="<%= this.Page.GetType().Name %>" class="website-content">
But I got it in the form
master_page_name_aspx
I also tried
<div id="<%= this.Page.GetType().GetType().Name %>" class="website-content">
but it produced RuntimeType
I’d like to get, for example, EditUser, or whatever the page web form class is called.
How can I achieve this?
What you want is probably:
Since
GetType().GetType()will only return the same type, regardless of how many times you invoke it.