link hover image

The type or namespace name does not exist in the namespace ‘System.Web.Mvc’

Frontpage calendar image December 14, 2014

Buiding MVC3 solution went well but have got an error in browser: Compiler Error Message: CS0234: The type or namespace name ‘Html’ does not exist in the namespace ‘System.Web.Mvc’ (are you missing an assembly reference?) Solution: Clean your solution and then set the property of those files to Copy Local = True.

link hover image

How to disable postback on an asp Button

Frontpage calendar image December 6, 2014

How to disable postback on an asp Button: your javascript return false when it’s done. < asp:button runat="server".... OnClientClick="myfunction(); return false;" / >

link hover image

Window opener Property

Frontpage calendar image December 2, 2014

The opener property returns a reference to the window that created the window. When opening a window with the method, you can use this property from the destination window to return details of the source (parent) window. myWindow.opener.document.write(“The source window!”);

link hover image

Name does not exist in the current context

Frontpage calendar image November 23, 2014

Item.aspx This is the phyiscal file -> CodeFile=”Item.aspx.cs” This is the class which handles the events of the page -> Inherits=”item” Jobs.aspx.cs This is the partial class which manages the page events -> public partial class item_class: System.Web.UI.Page The other part of the partial class should be -> public partial class item_class this is usually the […]

link hover image

Prepopulated textbox value to disappears onclick

Frontpage calendar image November 21, 2014

How to prepopulated textbox value to disappears onclick? < asp:TextBox ID=”txtValue” runat=”server” onfocus=”(this.value==’Enter Text’)?this.value=”:this.value=this.value” onblur=”(this.value==”)?this.value=’Enter Text’:this.value=this.value” >< /asp:TextBox>    

link hover image

How to Load Partial Views in ASP.Net MVC Using jQuery Ajax

Frontpage calendar image November 20, 2014

In this article, we’ll discuss partial views in ASP.NET MVC and loading them via jQuery AJAX. Let’s assume that we have a page that contains multiple partial views and  data from various sources. By default it is included in the _Layout.cshtml. < div id="divFirstPatialResults" > @Html.Partial(” _FirstPartial “, Model.FirstResults) < /div> < div id="divSecondPartialResults" > […]

link hover image

How to use SQL Server Management Studio

Frontpage calendar image November 4, 2014

SQL Server comes with a couple of neat features that make it very easy to capture an execution plan, simply make sure that the “Include Actual Execution Plan” meny item (found under the “Query” menu) is ticked and run your query as normal. Actual Execution Plan – (CTRL + M) – is created after execution […]

link hover image


Frontpage calendar image October 27, 2014

HTML Helper is just a method that returns a HTML string. You can use HTML Helpers to render standard HTML tags like HTML < input type=”text” />, < button> and … You can also create your own HTML Helpers to render more complex content. Inline Html Helpers @helper MyButton(long Id, string Name, bool isActive) { […]

link hover image

How to execute clientside javascript function using codebehind function in

Frontpage calendar image October 26, 2014

You must have a ScriptManager on the page then server-side: ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), “block”, “MyJSScript();”, true);

link hover image

How to align vertically a < div> to the middle of the page

Frontpage calendar image October 26, 2014

< body> < div style="width:900px; margin:0 auto;"> centered content here < /div> < /body>