This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#CheckBoxID').click(function () { | |
if ($(this).is(':checked')) { | |
$('#DivID').show(); | |
} else { | |
$('#DivID').hide(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI.WebControls; | |
using MiniRideAndDrive.Web.Data; | |
public static partial class Helpers { | |
public static string BaseUrl { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function BindEvents() | |
{ | |
// Here your js function calls go | |
} | |
var prm = Sys.WebForms.PageRequestManager.getInstance(); | |
prm.add_endRequest(BindEvents); | |
--- OR--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Constructs a NameValueCollection into a query string. | |
/// </summary> | |
/// <remarks>Consider this method to be the opposite of "System.Web.HttpUtility.ParseQueryString"</remarks> | |
/// <param name="parameters">The NameValueCollection</param> | |
/// <param name="delimiter">The String to delimit the key/value pairs</param> | |
/// <returns>A key/value structured query string, delimited by the specified String</returns> | |
public static string ToQueryString(this NameValueCollection parameters, String delimiter, Boolean omitEmpty) | |
{ | |
if (String.IsNullOrEmpty(delimiter)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Redirect the current request back to the current page = full page reload | |
/// </summary> | |
public static void RedirectSelf(this HttpResponse response) | |
{ | |
response.Redirect(HttpContext.Current.Request.RawUrl); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE | |
Open a Command Prompt in the above folder and then run the delete command like below: | |
(don't forget the "/DefaultCollection" bit and remember to use quotation marks around your team project name if it has spaces in it) | |
tfsdeleteproject.exe /force /collection:https://<YourCollection>.VisualStudio.com/DefaultCollection "My project name with spaces" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.codeproject.com/Articles/653746/Top-10-ASP-NET-MVC-Interview-Questions | |
http://www.codeproject.com/Articles/639717/MVC-Interview-Questions-and-Answers-All-about-MVC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBCC CHECKIDENT (tableName, RESEED, 10) | |
Note that the next value will be whatever you reseed with + 1, so in this case I set it to 10 so that the next value will be 11. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.codeproject.com/Articles/657264/Couple-of-not-so-different-approaches-to-paging-in | |
http://www.codeproject.com/Articles/533932/Custom-ASP-NET-MVC-ActionResults | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Button1_Click(object sender, EventArgs e) | |
{ | |
Page.Validate(); <--- you need this | |
if (Page.IsValid) | |
{ | |
lblResult.Text = "All Good"; | |
} | |
else | |
{ | |
lblResult.Text = "The words you entered are incorrect"; |
OlderNewer