DotNet Solution

  • Home
  • Asp.net
    • Controls
    • DataControl
    • Ajax
  • Web Design
    • Html
    • Css
    • Java Script
  • Sql
    • Queries
    • Function
    • Stored Procedures
  • MVC
    • OverView
    • Create First Application
  • BootStrap
    • Collapse Function

Saturday, 17 December 2016

Create First MVC Application

  Unknown       21:28       No comments    

How to create MVC First simple application

It is very easy to make application in mvc follow some steps and create first application

STEP 1 - Click on Start menu and  Open Visual studio.


STEP 2 - Open View folder click Home folder and click index page run and see on  home this is by default in Poject inbuilt page so see esaly. And if we create new Controller then see right click on controller folder and add new controller.


STEP 3 - Open A window and choose Empty controller and click on add button->  open next we give name of the controller.
Ex. we Give name Simplecontroller and click add button. In application add controller like.


In This index is by default create action.
  public class SimpleController : Controller
Controller is base class inherit this controller.
STEP 4 -  Add on view Right click on Index method ->click on  ->Add View. open new window.



Give name view and if we add layout page (master page then choose in drop down if no then leave empty) and click Add button 
Ex. in this View index name and create page in View folder-> simple folder->Index page. now we ready to code.




Save yhis content and run this page.
Output-

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Thursday, 15 December 2016

Open First Application in MVC

  Unknown       08:35       CreateApplication       No comments    


How To Create First Application in MVC.Follows Some Steps-

   STEP 1. Firstly Go Start menu in Computer And Click on Installed Visual studio.
   Ex.


Open This Window after processing next  window open like-
Ex.


STEP 2.  Create  new application select new project or We Also Select in file new project. 
                Click on  a new project.


STEP 3.  Choose Your Project Save Location and Select Asp.net web Application and click on button.Next Open window.


Select MVC and Click OK button Then open Application We See.


We see folder Model ,View and Controller. 
 Model   -  Right Click on Model folder and Add New Class .We Declare Property And Data type 
                  Which is use in Project.
Controller - Make Function and use Model classes in Controller and Add view easly through                                   controller  action .Coding Part Write in Controller
View -   Use  Model class and Create design part in view.
Content -  This folder contain all CSS regarding Project Releted.
Script -  This folder contain All JS we use in our Project
WebConfig - Connection String Write in Web Config.
Global - We define route of application page



Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Saturday, 10 December 2016

Javascript Regular Expression Email Validate

  Unknown       21:19       No comments    


Validate Email using Regular Expression In JavaScript-

1. Create Input type Text box and and onclick cal  checkemail function of Javascriptusing .
2. Define Function in Script with regex expression .

<script>
function checkEmail()
{
      email = $('#txtEmail');
      filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
   if (filter.test(email.value)) {
      //  valid Email
          return true;
            }
   else
          {return false;}
  }
</script>
<body>
      <input id="txtEmail" type="text" onclick="checkEmail();" />
</body>
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Thursday, 8 December 2016

Email Validation In JavaScript

  Unknown       10:07       javascript       No comments    


We use Validation for Email  in Javascript
like in above example

<!DOCTYPE html>
<html>
<head>
<script>
function validateForm() {
    var x = document.forms["myForm"]["email"].value;
    var atpos = x.indexOf("@");
    var dotpos = x.lastIndexOf(".");
    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) {
        alert("Not a valid e-mail address");
        return false;
    }
else
    {
         alert("Valid e-mail address");}
     }
}
</script>
</head>

<body>
<form name="myForm"  onsubmit="return validateForm();" >
Enter Email: <input type="text" name="email">
<input type="submit" value="Submit">
</form>
</body>

</html>


OutPut
Enter Email:
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Friday, 2 December 2016

Collapse Function Use in Bootstrap.

  Unknown       11:51       AllFunction       No comments    


Defination 

1.  Collapse Means suddenly fall down.
2.  Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.
3. Collpse means expand area just like toggle.
4. We Want to Toggle like show and hide any paragraph On Click.
Example
<html>
<head>
   <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"></link>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
  <h3>
Collapse</h3>
<button class="btn btn-info" data-target="#test" data-toggle="collapse" type="button">Simple collapsible</button>
  <div class="collapse" id="test">
   Hello This is collapse Function Use
  </div>
</div>
</body>
</html>


OutPut
Please Click on Button and show Expand Paragraph


Collapse

Hello This is collapse Function Use

The Collapse   Plugin Classes
Class  Discription
.collapse :   Hides the content
.collapse in : Show the content
.collapsing :Added when the transition starts, and removed when it finishes
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Newer Posts Older Posts Home

Popular Posts

  • Auto Increment Id in Sql Server
    SQL server identity column values use in table Steps- Firstly Open-> Sql Server Create Table -> First Field Like ID Usually Autoi...
  • MVC Framework Architecture
    MVC Flow- MVC application takes place when certain request comes from the client. The diagram below shows the flow: Flow Steps ...
  • Create First MVC Application
    How to create MVC First simple application It is very easy to make application in mvc follow some steps and create first application ST...
  • Reset Identity Column in Sql Server
    We Want To Reset Identity Column Then Use Code.If We Delete column By Id Like We delete 5 no id and After Than we Insert New then We get 6...
  • Unicque Row Num and Same Rank in Sql server
     Use Of  Row_Number() ,Rank() function , Dense_Rank() Row_Number() This function will assign a unique id to each row returned from t...
  • Create Table
    Create Table In Sql Server Syntax- CREATE TABLE TableName ( ColumnName1  INT PRIMARY KEY IDENTITY, ColumnName2, ColumnName3 ) Ex.  C...
  • Email Validation In JavaScript
    We use Validation for Email  in Javascript like in above example <!DOCTYPE html> <html> <head> <script> fu...
  • Numeric Value Validation Through JavaScript
    Validate Only Numeric Value Enter In TextBox Using JavaScript function Firstly Write Java Script Function in <head tag> in Asp.Net ...
  • Asp.net- MultiView
    MultiView and View controls allow you to divide the content of a page into different groups, displaying only one group at a time. Each Vie...
  • The Evolution of MVC
    Microsoft had introduced ASP.NET MVC in .Net 3.5,since then lots of new features have been added.The following table list brief history of ...

Blog Archive

  • ▼  2016 ( 36 )
    • ►  February ( 1 )
    • ►  March ( 5 )
    • ►  April ( 1 )
    • ►  June ( 10 )
    • ►  July ( 6 )
    • ►  November ( 8 )
    • ▼  December ( 5 )
      • Collapse Function Use in Bootstrap.
      • Email Validation In JavaScript
      • Javascript Regular Expression Email Validate
      • Open First Application in MVC
      • Create First MVC Application
  • ►  2017 ( 1 )
    • ►  January ( 1 )
Powered by Blogger.

Categories

  • Ajax
  • AllFunction
  • Controls
  • CreateApplication
  • css
  • Function
  • javascript
  • Js
  • over view
  • OverView
  • Queries
  • StoredProcedures

Text Widget

Sample Text

Pages

  • Home

Copyright © DotNet Solution | Powered by Blogger
Design by Vibha Acharya