I have an Admin folder which contains 4-5 aspx pages. I want to that only user with role="admin" can view those files. What settings i need in web.config?
i am trying to show/hide a flash object based on click of button, but the code is not working
//to hide
$('object').css({visibility: 'hidden'});
//to show
$('object').css({visibility: 'visible'});
i dont want to use .show() and .hide() as they will also remove the area of flash content.
I have applied DataAnnotation based validations to two of my properties like this
[Required(ErrorMessage = "Title is required")]
public string Title { get; set; }
[Required(ErrorMessage = "Description is required")]
public string Description { get; set; }
Here is the view page's code
@Html.LabelFor(model => model.Obj.Title)
@Html.EditorFor(model => model.Obj.Title)
@Html.LabelFor(model => model.Obj.Description)
@Html.TextAreaFor(model => model.Obj.Description)
The Problem is that on click of submit button, on client side (js) its only giving me error for for Title and not for the Description. But Its giving me validation error for the Description after the postback.
What possible causes?
I want to create a simple CMS for my asp.net-mvc site. Needs some help to start.
Will i save my whole page to db? what if my page contain links like
Url.Content("~/somepage")
When the admin will edit the page he will get the plain link not the Url.Content. How i can handle this in CMS?
I have 4-5 partial view files (.ascx) like
abc.ascx, cde.ascx, fgh.ascx.
I want to return different partial views based on the name of the view passed to url parameter like this
/someservice/abc will go to action someservice and will return abc.ascx partial view.
/someservice/cde will go to action someservice and will return cde.ascx partial view.
How can achieve this?
I have a table with 5 rows and 2 columns. Each cell contains a text box. I want to show error if one of the text boxes in each column is empty. I want both text boxes in a row shld be filled or both shld empty.
How can i do this via Asp.net validation controls?
I have created an Asp.net website using VS 2008 and SQL Express 2008 on one PC. with db files in |Data Directory|.
When i copied these website files to another PC ( having same VS 2008 and SQL Express 2008) its giving me error
user instance login flag is not supported on this version of sql server
I have a class like this
$.fn.dimeBar = function(custom) {
var var1 = 'test1';
var var2 = 'test2';
if(sometest){
//how can i access var1 or var2 here by using string name of variables
//some thing like alert(this['var1']) -- should alert: 'test1'
}
}