6755 1
How to pass Model to Partial View in ASP.NET MVC?

I have created Bootstrap tabs inside ASP.NET MVC razor view and calling Partial View from inside bootstrap, but I would like to know how can I pass Model to partial view while rendering it?

...
Type
Question
6725 3
how to integrate SSRS in asp.net mvc from scratch ?

How to integrate SSRS with MVC from scratch?

...
Type
Question
6723 1
The model backing the 'bwavenueDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database

I am getting this error when trying to work on Code First migration with Entity Framework

The model backing the 'bwavenueDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database

here is the error image

...

Type
Question
6632 2
How to do server validation in bootstrap pop-up modal?

I am using partial in pop-up modal, and I wanted to do a server validation but I want the modal will stay, is it possible without reloading?

I am using "Ajax.BeginForm". Thanks

...
Type
Question
6588 2
ASP.NET Web-Form Error "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)."

I have created a new empty ASP.NET web-forms project using Visual Studio, after adding the new .aspx (web-form) file with the RegularExpressionValidator code as shown below, I am getting an error "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)."

Here is the code of my Web-Form page(Default.aspx)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EmailIdValidate.Default" %>

<!DOCTYPE html>
<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Your email: " + TextBox1.Text.ToString();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Validate email address using RegularExpressionValidator in ASP.NET</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Red">RegularExpressionValidator: email</h2>
        <asp:Label 
             ID="Label1" 
             runat="server"
             Font-Bold="true"
             Font-Italic="true"
             Font-Size="Large"
             ForeColor="SeaGreen"
             >
        </asp:Label>

        <br /><br />
        <asp:Label ID="Label2" runat="server" Text="Email">
        </asp:Label>
        <asp:TextBox  ID="TextBox1" runat="server" >
        </asp:TextBox>

        <asp:RequiredFieldValidator 
             ID="RequiredFieldValidator1"
             runat="server"
             ControlToValidate="TextBox1"
             Text="*"
             >
        </asp:RequiredFieldValidator>

        <asp:RegularExpressionValidator 
            ID="RegularExpressionValidator1"
            runat="server" 
             ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
            ControlToValidate="TextBox1"
            ErrorMessage="Input valid email address!"
            >
        </asp:RegularExpressionValidator>

        <br /><br />
        <asp:Button 
             ID="Button1" 
             runat="server" 
             Text="Submit email"
             Font-Bold="true"
             ForeColor="DodgerBlue" 
             OnClick="Button1_Click"
             />
    </div>
    </form>
</body>
</html>

When building the project and running it browser getting error details as shown below

...

Type
Question

6569 0
Export to Excel C# GridView in ASP.NET Web-Form
In this article, I have provided working sample to export GridView data to excel using C# without using any external library.
Type
Article
6560 0
Redirect from non-www to www website using IIS (and Vice-Versa)
In this article, we will see how we can redirect from non-www website to www website url using IIS URL re-write feature or using web.config.
Type
Article
6556 3
If Statement condition in ASP.NET Web-Forms?

I want to write a basic if statement on my web-application, as I would like to place <script> based on a condition in .aspx page, how can I achieve it?

Something like

...
Type
Question
6489 1
How to Leverage browser caching for my CSS and js files.

How to Leverage browser caching for my CSS and js files?

...
Type
Question
6389 1
How to include anti-forgery token in ajax request in ASP.NET MVC?

When I am posting Form using jQuery Ajax in my ASP.NET Zero template, I am getting this error "Invalid anti-forgery token" or "The required anti-forgery form field \"__RequestVerificationToken\" is not present."

How can I Include in it in my AJAX Request in ASP.NET MVC, here is my current jQuery code

...
Type
Question

Page 16 of 31