0

I have a webForm (WebForm1.aspx) added inside the root

I have a webForm (WebForm1.aspx) added inside the root

I want to call this WebForm1.aspx from a razor view when a div is clicked (div is placed inside the view with some styles) to a new browser tab.

Suppose Controller is X and View is Index

Below is some piece of index razor view code

<div class="column" 
style="flex:50%;padding:10px;" 
onclick="@("window.location.href='" + @Url.Action("WebForm1.aspx") + "'");">

</div>

NB : WebForm1.aspx has some RDL reportViewer. When i call this WebForm1 using a partial view, the report is not rendering, when i call directly WebForm1.aspx by entering URL on broswer it shows report. Some postback issues happening i guess! Help me guys, How to call this form inside a view directly ?

Lazy Programer
  • 171
  • 1
  • 1
  • 12
  • if you use `window.location.href` it's going to open the link in the current page better use:`window.open('" + @Url.Action("WebForm1.aspx") + "', '_blank');` instead. here `_blank` represents a new window/tab. And if you don't have a particular need try using an anchor(`a`) tag with target as `_blank`. – vikscool Feb 13 '20 at 07:05
  • Does this answer your question? [How to show webforms page .aspx in VIEW MVC3 Razor](https://stackoverflow.com/questions/14171404/how-to-show-webforms-page-aspx-in-view-mvc3-razor) – Rahul Sharma Feb 13 '20 at 07:08

0 Answers0