android app dev assign int value to a TextView
This is rather wierd, when you want to assign an integer to a TextView apparently you need to assign the combination of "" + and your integer value.
Achievement provides the only real pleasure in life
This is rather wierd, when you want to assign an integer to a TextView apparently you need to assign the combination of "" + and your integer value.
Posted by
SF
at
1:54 am
0
comments
I have an asp.net webforms application with later on added mvc component. The login view is embeded inside the homepage Default.aspx. When I type into browser and try to open a login controlled URL without loggged in, i should be redirected to the Default.aspx homepage for login, but instead I get 404 not found error looking for "/Account/Login".
The solution worked for me is rather wierd:
add the following setting in AppSettings section of your web.config
Posted by
SF
at
1:16 pm
0
comments
if (!page.ispostback)
{
RadGrid1.MasterTableView.FilterExpression = "([Country] LIKE \'%Germany%\') "; GridColumn column = RadGrid1.MasterTableView.GetColumnSafe("Country"); column.CurrentFilterFunction = GridKnownFunction.Contains; column.CurrentFilterValue = "Germany"; RadGrid1.MasterTableView.Rebind();
}
Posted by
SF
at
4:06 pm
0
comments
EXEC sp_MSforeachdb 'USE ?
select ''?'' as DatabaseName, st.name as TableName,si.name as IndexName from sys.indexes si
inner join sys.tables st
on
si.object_id = st.object_id
where si.name like ''%NC_explore_user%'''
Posted by
SF
at
4:22 pm
0
comments
the solution for me is to have this under
also you need to make sure your hosting environment is setup for .net v4.x and integrated mode
Posted by
SF
at
11:41 pm
0
comments
ViewData/ViewBag : only eixsts for single controller request on single view
Posted by
SF
at
10:25 pm
0
comments
Imaging there is a many to many relationship between category and product and there are some specific information required on this many to many relationship, therefore we need a dedicated entity CategoryProduct to work with. On submission I need to validate whether the combination of category and product selections already exist.
in validation controller provide:
public JsonResult ValidateCategoryProduct(int? categoryProductId, int categoryId, int productId)
{
if (!categoryProductId.HasValue)
{
categoryProductId = -1;
}
var validationResult = categoryProductRepository.ValidateCategoryProduct(categoryProductId.Value, categoryId, productId);
if (validationResult)
{
return Json(true, JsonRequestBehavior.AllowGet);
}
else
{
string output = "This category product relationship has already been setup.";
return Json(output, JsonRequestBehavior.AllowGet);
}
}
in my model I have
[DisplayName("CategoryId")]
[Remote("ValidateCategoryProduct", "ValidationLogic", AdditionalFields = "CategoryProductId,ProductId")]
[Editable(true)]
public int CategoryId { get; set; }
[DisplayName("ProductId")]
[Required(ErrorMessage = "Please select a Product")]
[Remote("ValidateCategoryProduct", "ValidationLogic", AdditionalFields = "CategoryProductId,CategoryId")]
[Editable(true)]
public int ProductId { get; set; }
in my view I have the following under the category textbox
@Html.ValidationMessageFor(model => model.CategoryId, "*")
I also have the following under the productid textbox
@Html.ValidationMessageFor(model => model.ProductId, "*")
now we are good to go, the only issue left is that we need to figure out a way to apply validation result to both properties at once..... puzzled at the moment.
Posted by
SF
at
11:29 pm
0
comments
.CellAction(cell=>{
if (cell.Column.Title == "Delete" && cell.DataItem.ChildRecords.Count > 0)
{
cell.HtmlAttributes["style"] = "visibility:hidden";
}
})
alternatively:
columns.Template(
@
).Title("Delete");
Posted by
SF
at
9:38 pm
0
comments
RadDatePicker1.get_dateInput().get_selectedDate().format("dd/MM/yyyy");
Posted by
SF
at
2:00 pm
0
comments
$find("<%= RadTextBox1.ClientID %>").get_value();
Posted by
SF
at
1:59 pm
0
comments