Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify ASP.NET web forms and ASP.NET MVC websites?

Is there any way to find if a site developed by ASP.NET MVC or ASP.NET web forms ?
I want to find if this site developed by ASP.NET MVC or ASP.NET web forms.

like image 576
Shahin Avatar asked Dec 28 '25 15:12

Shahin


1 Answers

Normally a webform application have few things like

  • <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
  • <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
  • <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="viewStateData" />

Also to be considered most of the elements in the pages have

  • Name looks like ctl00$childControl$childControl$anyName
  • ID looks like ctl00_childControl_childControl_anyName

And definitely there will be block like this

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];

function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>

And for ASP.NET MVC, How do I identify an ASP.NET MVC website?

like image 195
Abdul Munim Avatar answered Dec 31 '25 07:12

Abdul Munim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!