Skip to content

Instantly share code, notes, and snippets.

View vikas6962's full-sized avatar

Vikas Gupta vikas6962

  • Lucknow
View GitHub Profile
@vikas6962
vikas6962 / ReportController.cs
Created January 2, 2018 12:00
Crystal Report
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication3.Models;
using System.IO;
using CrystalDecisions.CrystalReports.Engine;
namespace MvcApplication3.Controllers
{
@vikas6962
vikas6962 / Database
Last active January 2, 2018 05:59
login signup
create table Users(ID int Primary key identity,Name varchar(30),Email varchar(50),
Dob date,Password varchar(50))
create procedure Pr_User
@ID int=0,
@Name varchar(50)=null,
@Email varchar(50)=null,
@Dob date=null,
@Password varchar(50)=null,
@ProcID int=0
@vikas6962
vikas6962 / AddStudent.cshtml
Last active February 5, 2018 11:03
Crud with Image Using Angular and dataContext
<h2>AddStudent</h2>
<head>
<title>AddStudent</title>
<script>
function loadimg() {
$('input:[type="file"]').attr("id", "img");
}
@vikas6962
vikas6962 / Print
Last active December 20, 2017 08:54
Print a section or div of page
<html>
<head>
<script>
function printDiv()
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window');
@vikas6962
vikas6962 / HomeController.cs
Last active December 4, 2017 09:27
Rendering Partial View using Ajax form
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Cahting.Controllers
{
public class HomeController : Controller
{
@vikas6962
vikas6962 / DataContext.cs
Last active December 9, 2017 06:44
Pagination and Filtering data
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Data.SqlClient;
using MvcApplication2.Models;
namespace MvcApplication2.Models
{
@vikas6962
vikas6962 / Dot Net Codes
Last active February 28, 2018 06:58
Help Links
http://www.dotnetawesome.com/
@vikas6962
vikas6962 / Datalayer.cs
Last active November 27, 2017 07:37
task
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
namespace MvcApplication1.Models
{
@vikas6962
vikas6962 / AddStudent.cshtml
Last active November 30, 2017 08:07
Crud through angular
<head>
<script>
var app = angular.module("MyApp", []);
app.controller("MyCtrl", function ($scope) {
$scope.Data = function () {
if ($scope.myForm.Name.$valid && $scope.myForm.Email.$valid) {
alert($scope.Name + " " + $scope.Email)
@vikas6962
vikas6962 / AddStudent.cshtml
Created November 17, 2017 08:19
angular code
<head>
<script>
var app = angular.module("MyApp", []);
app.controller("MyCtrl", function ($scope) {
$scope.Data = function () {
if ($scope.myForm.Name.$valid && $scope.myForm.Email.$valid) {
alert($scope.Name + " " + $scope.Email)