ASP.NET MVC website that display blogs from the database by AJAX The problem is, I have to limit the results to only 10 by default and add a "Load More" button to display 10 more results each time when user click the button. But I'm worried about users having their JavaScript disabled, because in that case, users won't be able to see more blogs.

But I can also use MVC Razor Syntax codes to display more results by requesting the URL parameters by a button inside a form and it's also works fine and it's only a few lines of codes, but the only problem is the URL parameters showing in the address bar and I don't want them to be showing up.

Now I'm putting my MVC Razor Syntax codes to inside a &lt;noscript&gt;&lt;/noscript&gt; tag for JavaScript Backup and it's working perfectly.

What I want to know is there any disadvantage of doing this or if there is any better solution to achieve this. I don't know much about the NoScript tags or how that works with Razor Syntax codes.

.cshtml

&lt;noscript&gt;

    @{
        var rowsNumb = 10;
        var db = Database.Open("Northwind");
        rowsNumb = Request["lastRec"].AsInt() + 10;
        var maxRecs = db.QueryValue("SELECT COUNT([Product Id]) FROM Products");
        var sql = @"SELECT * FROM Products ORDER BY [Product Id] OFFSET 0 ROWS FETCH NEXT @0 ROWS  ONLY";
        rowsNumb = (rowsNumb &gt; maxRecs ? maxRecs : rowsNumb);
        var result = db.Query(sql, rowsNumb);
    }

    &lt;table&gt;
        @foreach(var row in result){
            &lt;tr&gt;
                &lt;td&gt;@row["Product Name"]&lt;/td&gt;
                &lt;td&gt;@row["English Name"]&lt;/td&gt;
                &lt;td&gt;@row["Unit Price"]&lt;/td&gt;
            &lt;/tr&gt;
        }
    &lt;/table&gt;
    &lt;form&gt;
        &lt;input type="hidden" name="lastRec" value="@rowsNumb" /&gt;
        &lt;button type="submit"&gt;Load More&lt;/button&gt;
    &lt;/form&gt;

&lt;/noscript&gt;
Putting your JavaScript alternative in &lt;noscript&gt; is exactly what &lt;noscript&gt; was meant for. There is nothing in the specs that would make this a bad idea.

I have to note that the derivation of rowsNumb in your code is terrible:

    var rowsNumb = 10;   //&lt;- RowsNumb is 10
    var db = Database.Open("Northwind");
    rowsNumb = Request["lastRec"].AsInt() + 10; //No longer 10, but last request + 10
    var maxRecs = db.QueryValue("SELECT COUNT([Product Id]) FROM Products");
    var sql = @"SELECT * FROM Products ORDER BY [Product Id] OFFSET 0 ROWS FETCH NEXT @0 ROWS  ONLY";
    rowsNumb = (rowsNumb &gt; maxRecs ? maxRecs : rowsNumb); //Possibly not last request + 10 ..
    var result = db.Query(sql, rowsNumb);


You could try something like this:

    var db = Database.Open("Northwind");
    var maxRecs = db.QueryValue("SELECT COUNT([Product Id]) FROM Products");
    var rowsNumb = Math.min( Request["lastRec"].AsInt() + 10 , maxRecs )
    var sql = @"SELECT * FROM Products ORDER BY [Product Id] OFFSET 0 ROWS FETCH NEXT @0 ROWS  ONLY";
    var result = db.Query(sql, rowsNumb);


I am also not 100% about your SQL statement, but given that it goes against Nortwind..