Posts

[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to [B]System.Web.WebPages.Razor.Configuration.HostSection. Type A originates from 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'.

Image
Solution:       Add these line in Web.Config    < configSections >     < sectionGroup name =" system.web.webPages.razor " type =" System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 ">       < section name =" host " type =" System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 " requirePermission =" false " />       < section name =" pages " type =" System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 " requirePermission =" false " />     </ sectionGroup >   </ configSections >

How to Pass Datatable in Session C#

First assign datatable into Session.  Session[ "DT" ] = dt;  Response.Redirect( "Page2.aspx" ); In Page2.aspx page Load function call the thease Code to Get Session Table. DataTable dtm = ( DataTable )Session[ "DT" ];

Get Selected Checkbox Value from Gridview in Asp.net C#

In this Blog as Work with in gridview Selected Checkbox ID Value can Get In C#. ASPX Code:    < div style =" width : 104%; height : 243px; max-height : 243px; overflow : auto;">     < asp : GridView ShowHeader ="false" AutoGenerateColumns ="false"                       ID ="chklCategory" runat ="server">   < Columns >                                                                                     < asp : TemplateField >      ...

Display Jqplot Line Charts Data from Database

Image
     In this Section We See about Line Charts Using JqPlot. Jqplots provides Line. Pie Doughnut , Bar Charts for Freely.  Aspx Page: <% @ Page Language ="C#" AutoEventWireup ="true" CodeBehind ="jqplot.aspx.cs" Inherits ="BloggerCont.jqplot" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title ></ title >     < script src ="jqplot/jquery.min.js" type ="text/javascript"></ script >     < link href ="jqplot/jquery.jqplot.css" rel ="stylesheet" type ="text/css" />     < script src ="jqplot/jquery.jqplot.js" type ="text/javascript"></ script >         < script type =...

Display Canvasjs Line Chart using Data from Database

Image
Aspx Page: <% @ Page Language ="C#" AutoEventWireup ="true" CodeBehind ="Canvasjs.aspx.cs" Inherits ="BloggerCont.Canvasjs" %> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < script src ="jquery-1.7.1.js" type ="text/javascript"></ script >     < script src ="canvasjs.min.js" type ="text/javascript"></ script >     < script type ="text/javascript">         $(document).ready( function () {             Disp();         });         function Disp() {             var dataPts = [];             var var1;         ...

Superscript In Asp.Net Textbox without using Richtextbox

Instead of Use  mc⁴ Code to mc<sp>4</sp>. <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title ></ title >     < script src ="Js/jquery.min.js" type ="text/javascript"></ script >      < script type ="text/javascript">          $.fn.superScript = function () {              var chars = '+−=()0123456789AaÆᴂɐɑɒBbcɕDdðEeƎəɛɜɜfGgɡɣhHɦIiɪɨᵻɩjJʝɟKklLʟᶅɭMmɱNnɴɲɳŋOoɔᴖᴗɵȢPpɸrRɹɻʁsʂʃTtƫUuᴜᴝʉɥɯɰʊvVʋʌwWxyzʐʑʒꝯᴥβγδθφχн ნ ʕⵡ' ,         sup = '⁺⁻⁼⁽⁾⁰¹²³⁴⁵⁶⁷⁸⁹ᴬᵃᴭᵆᵄᵅᶛᴮᵇᶜᶝᴰᵈᶞᴱᵉᴲᵊᵋᶟᵌᶠᴳᵍᶢˠʰᴴʱᴵⁱᶦᶤᶧᶥʲᴶᶨᶡᴷᵏˡᴸᶫᶪᶩᴹᵐᶬᴺⁿᶰᶮᶯᵑᴼᵒᵓᵔᵕᶱᴽᴾᵖᶲʳᴿʴʵʶˢᶳᶴᵀᵗᶵᵁᵘᶸᵙᶶᶣᵚᶭᶷᵛ ⱽ ᶹᶺʷᵂˣʸᶻᶼᶽᶾꝰᵜᵝᵞᵟᶿᵠᵡ...