What are different stages in ASP.NET Application and Page Life Cycle- Asp.Net

Apr 24, 2019 BY xtreme

.ASP.NET Application Life Cycle 1) Application Start 1. This happens when the first user normally goes to the home page for the application for the first time. During this time, there is a method called Application_start which is executed by the web server. When User makes a request for ac...

What are the different ways to pass/transfer content/data - Asp.NET (C#)

Apr 24, 2019 BY xtreme

.1. Using Session State protected void btnSessionState_Click(object sender, EventArgs e){ Session["Data"] = txtData.Text; Response.Redirect("next.aspx"); } Data is: <%=Session["Data"] %> OR if (!string.IsNullOrEmpty((string)Session["Data"])) { lblDefaultData.Text = (str...

Different Types Of Action Results In ASP.NET- MVC

Apr 23, 2019 BY xtreme

An ActionResult is a return type of a controller method in MVC. Types of ActionResult1, View, public ViewResult Index() { <!-- Normal Return --> ViewBag.ItemList = "Computer Shop Item List Page"; return View(); OR <!-- Return With Model --> @model School...

What are the different ways to pass/transfer content/data - MVC

Apr 23, 2019 BY xtreme

.A. From View To Controller 1. Transfer directly to the second View/Action <a href='@Url.Action("ActionTo", new ModelData { Name = "ItBlow" })'>click me</a> public ActionResult ActionTo(ModelData m){} 2. POST data to a [HttpPost] Index action @using (Html.BeginForm()) { ...

How to bind records Using JQuery DataTables

Apr 23, 2019 BY xtreme

.JS filevar oTable; var ClassModule = { LoadGrid: function () { var buttonCommon = { exportOptions: { format: { body: function (data, row, column, node) { return data; ...

In EDMX Stored procedure returns int instead of result set- Entity Framework, .Net

Apr 11, 2019 BY xtreme

A CUSTOM FUNCTIONSome time Entity framework not able to decide, what should be returned by the procedure, specially when we use some temporary tables or dynamic queries inside store procedure. we can manage this EITHER of following ways- Solution 1: Modify your Stored ProcedureSet this at ...

How to use Table Variable inside Dynamic Sql Query - Sql server

Mar 28, 2019 BY xtreme

create PROCEDURE [dbo].[report_admissions] @student_name varchar(100)='', @student_roll varchar(115)='' AS BEGIN DECLARE @Admissions TABLE ( ADMISSION_ID INT, ADMISSSION_DATE datetime ) DECLARE @query varchar(MAX) SET @query ='select DISTINCT admission_id, ADMISSSION_DAT...