Friday, July 3, 2015
The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "Scripts".
I put [HttpGet] Attribute above in the action. Now it's running.
If anyone know the reason, just comment below.
Thanks
Wednesday, July 1, 2015
ModelState.IsValid always false
Put this line above ModelState condition and check the values you getting for variable errors.
var errors = ModelState.Values.SelectMany(v => v.Errors);
Tuesday, May 5, 2015
A potentially dangerous Request.Form value was detected from the client
You can see this error everytime when you submit HTML code to the server. To avoid this set validateRequest="false" in the page and in .net 4 you need to add this <httpRuntime requestValidationMode="2.0" /> to the web.config file.
Thanks
Lasa
Friday, January 23, 2015
Invalid anonymous type member declarator MVC
I got this error message when i use @data-group in ActionLink.
@Html.ActionLink(cardCategory.Name, "Index", new { controller = "Home" }, new { @class = "btn btn-default btn-lg btn-filter", @data-group = "C" })
Use an underscore
@Html.ActionLink(cardCategory.Name, "Index", new { controller = "Home" }, new { @class = "btn btn-default btn-lg btn-filter", @data-group = "C" })
Use an underscore
_ - the Razor engine is smart enough to translate that to a data- attribute.
Tuesday, December 9, 2014
Extract only emails from string using Javascript
Today I'm going to show you how to extract only email from string. This can be done using javascript. Here sample code
function extractEmails(text) {
return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
}
Monday, November 10, 2014
An error occurred while copying image, check your memory limit. prestashop
This is not related to prestashop. You have to increase memory limit in php.ini file in your server.
I'm using fatcow as my service provider. Here the steps for solve this
I'm using fatcow as my service provider. Here the steps for solve this
- Log in to your FatCow Control Panel.
- Go to CGI and Scripted Language Support.
- Click PHP Scripting.
- Your php.ini file is displayed in a text box at the bottom. Click Edit if you cannot edit the php.ini file text.
- Locate the following block of code within your php.ini file:; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 32M - Modify the highlighted value for memory_limit as desired (example: 35M, or 40M, or 45M).
- Click Save.
Tuesday, October 28, 2014
Get ASPX control value in ASCX page
Hello,
To achieve this scenario, you have to first define public property in aspx page like this.
After that you can access your page controls like below
Try this.
To achieve this scenario, you have to first define public property in aspx page like this.
public DropDownList AffinityGroupDDL
{
get
{
return ddlAffinityGroup;
}
}
After that you can access your page controls like below
var dropDownList = ((StMainDashboard)Page).AffinityGroupDDL;
Try this.
Subscribe to:
Posts (Atom)
I Built a New Kind of Number Puzzle Game (And You Can Play It Free)
For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...
-
Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...
-
I have tried data-gramm="false" and hiding it through CSS, but neither of these solutions has worked. If anyone can resolve this i...
-
Introduction: In my MonoGame Android project, I wanted to provide users with the option to rate my app when they clicked a button within the...