-
Hi. The Attribute "DisplayName" is not working. How can I change the field display name? This is my code: [MetadataType(typeof(ProccesMetadata))] public partial class Process { public class ProccesMetadata { [DisplayName("Parent Process")] public object proceso_id { get; set; } [DisplayName...
Posted to
ASP.NET Dynamic Data
(Forum)
by
gbarbosa
on
05-04-2009, 12:00 AM
Filed under: ?Renaming Entities, asp.net, ASP.NET Dynamic Data, Attributes, Custom Properties, DiplayName attribute, Display Name, DisplayName, Dynamic Data
-
A co-worker resolved this issue for me. I am certain that this can be streamlined. In the DynamicData/FieldTemplates/DbImage.ascx.vb file we added the alt attribute at the end of the file. 'Enumerate table fields For i = 0 To Column.Table.Columns.Count – 1 'If the “ImageTag” table field equals...
Posted to
ASP.NET Dynamic Data
(Forum)
by
JeffT
on
04-08-2009, 12:00 AM
Filed under: VB.Net, ASP.NET Dynamic Data, ASP.NET Dynamic Data client side scripting, Attributes, binary/image, custom attributes, Data DynamicControl, DBImage, dynamic controls, Dynamic Data, Answer to thread
-
In the partial class apply the DisplayName attribute: [MetadataType( typeof (EmployeeMD))]
[DisplayColumn( "LastName" , "LastName" , true )]
[ReadOnly( true )] public partial class Employee
{ public class EmployeeMD { public object EmployeeID { get ; set ; } [DisplayName( "Last...
-
Hi, I'm trying to impose a minimum string length on one of the fields in my object model. StringLengthAttribute does not do this, so I looked at the RangeAttribute and did this... [Required] [Range( typeof ( string ), "2" , "100" )] [DisplayName( "name" )] public string...
-
Hi all, I am trying to expose a collection property for a custom control i am working on but for some reason I am not able to set the property using the properties window. When I click on the property it gives a window where I should be able to add the items to the collection but this window is disabled...
-
I'm trying to use the Cells in a Gridview Column as individual buttons to perform some logic in the background (I'm trying to avoid using a button in the cell because I need to display a picture in the particular cell in the row). I've been using (example):- e.Row.Attributes.Add("onMouseOver"...
-
Hi, any one know how can I retrieve image or file which is stocred within the custom control folder? As I would to display the image in the following way: output.AddAttribute(HtmlTextWriterAttribute.Src, "Resources/A.png" ))
output.RenderBeginTag(HtmlTextWriterTag.Img)
output.RenderEndTag(...
Posted to
Custom Server Controls
(Forum)
by
siegblazer
on
12-10-2008, 12:00 AM
Filed under: Resources, src, image, img, WebResource, WebResourceAttribute, web custom control, attributes, custom control
-
Hi Tigra68, what you need to do is create a partial class that matches one in you Linq to SQL or Entity Framework Model so if you have an entity called Employee in you model you would create a class file like so: using System.ComponentModel; using System.ComponentModel.DataAnnotations; [MetadataType...
-
[quote user="ricka6"] I think you want [UIHint( "MultilineText" )] not [UIHint( "MultilineText_Edit" )] [/quote] Yep that makes sense, otherwise when you edit it will look for a FieldTempalte called MultilineText_Edit_Edit for Edit and Insert pages
-
If you are not familiar with partial classes and metadata in Dynamic Data I suggest you have a look at some of the videos here : Here is some sample Partial Classes and Metadata [MetadataType( typeof (CategoryMD))] public partial class Category
{ public class CategoryMD { [ScaffoldColumn( true )] public...