I want to render a page using @RenderPage() if a specific div is empty (excluding whitespace). However, I don't know how to go upon doing this.
I tried doing this:
Code:
@if (Request["#divid"].IsEmpty()){
   @RenderPage("pagepath.cshtml")
}
I thought maybe this might work like when requesting the the content of an input tag using the 'name' attribute, but it doesn't.

If this would be better to do in Javascript then point me in the right direction.

Thanks. (Also, sorry if this is in the wrong forum, I thought since I'm using C# this might belong here.)