.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

<%# eval> not working for a simple property

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
<form id="form1" runat="server"> <div> <table> <tr> <td>Name: <%#customer%> </td> </tr> </table> </div> </form>        Partial Class ScorePage Inherits System.Web.UI.Page Private _customer As String = "Sachin" Public Property customer() As String Get Return _customer End Get Set(ByVal value As String) _customer = value End Set End Property End Class   The expected result in html page is Name: Sachin But i am getting Name: property is not getting displayed. I thought instead of creating a label control, we can use this method, but it is not working  

View Complete Post

More Related Resource Links

very simple asp:RegularExpressionValidator for Email not working

My implementation is simple. I have a public static variable in a class called EmailHelper containing my regular expression as follows:namespace Base.Core.Utilities { public static class EmailHelper { public const string EMAIL_REGEX = @"^([a-zA-Z0-9]+([\.+_-][a-zA-Z0-9]+)*)@(([a-zA-Z0-9]+((\.|[-]{1,2})[a-zA-Z0-9]+)*)\.[a-zA-Z]{2,6})$"; } } I then have the following web controls on my page:<asp:Panel ID="pnlChangeEmail" runat="server" DefaultButton="btnChangeEmail"> <asp:Label ID="lblChangeEmail" AssociatedControlID="txtEmail" runat="server">New email:</asp:Label> <asp:TextBox ID="txtEmail" runat="server" CssClass="textfield"></asp:TextBox> <asp:LinkButton ID="btnChangeEmail" OnClick="Change_Email" runat="server" ValidationGroup="ChangeEmail" CssClass="btn"> <strong><asp:Literal runat="server" ID="litSubmit" Text='<%$ Resources: GlobalResource, SUBMIT %>' /></strong> </asp:LinkButton> <asp:RequiredFieldValidato

Simple test not working

Hi all,  I've created a dummy test that does absolutely nothing. When I try to run it I get the following message: Error TestMethod1 TestProject Unable to get type TestProject.UnitTest1, TestProject. Error: System.BadImageFormatException: Could not load file or assembly 'TestProject, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. ... I compiled with platform set to x64, ma machine is a 64 bits and visual studio is not apparently [is installed in C:\Program Files (x86)]. I don't know exactly what .Net is installed. Struggling to really find out how to check that. Any ideas, Thanx, --mike

Member_Caption property not working in SSAS 2000

Hi, I need to pass a parameter to my SSRS report which is based on an Analysis services cube (AS 2000). I have created a query which will return me the members of a hierarchy that I can pas as a perameter. Interestingly the Member_Caption property is not working. In MDX Sample application it is returing "#err" in the column and when I run the same command in my SSRS MDX editor ( I am using OLEDB connection alongwith analysis services 9.0 client) I get empty space. My query is, WITH     Member [Measures].[ParameterCaption] as '[PRODUCT].CurrentMember.Member_caption' MEMBER   [Measures].[ParameterValue] AS '[PRODUCT].CurrentMember.UniqueName' MEMBER   [Measures].[ParameterLevel] AS '[PRODUCT].CURRENTMEMBER.LEVEL.ORDINAL' SELECT   {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , { Descendants([PRODUCT].Currentmember,1,leaves)+(Descendants([PRODUCT].Currentmember,2,leaves))} ON ROWS from   [My_Cube] Am I making any obvious mistake here ? I have used similar queries before and they have always worked (With SSAS 2005) Thanks in advance, Suman  

property setting in report server (2008) config file is not working as expected.



I have set the <WorkingSetMinimum> property to 2.4GB in my reportserver 2008 config file.

By defintion, <WorkingSetMinimum> setting means,

  1. Lower limit of service memory consumption; memory will not be released if the consumption is below this amount, though the service will not reserve the designated amount of memory when it starts.
  2. If service uses more than the designated amout of memory, it will release back the memory only till this declared value and not beyond that, which means it should keep 2.4GB as designated.

See this link for definition: http://books.google.com/books?id=mzY_Xo_9J-gC&pg=PA589&lpg=PA589&dq=What+is+%3Cworkingsetminimum%3E+in+report+server+configuration+file&source=bl&ots=r_xhRp8erj&sig=E_o0-Dh2SXOgMNrW3sptt5oZrYI&hl=en&ei=f5mjTNeNM5O8ccmErJMI&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCAQ6AEwAw#

DataTrigger bound to a datebound property using a converter not working.


Hi all, this will sound like a simple problem but I am really stumped!

I'm trying to create a TextBlock with a style that collapses when the text is "" or null. So in the style there's a DataTrigger bound to Text using a Converter that provide a boolean test for "" or null.

The problem is that the triggers never seem to fire. Debugging the converter suggests it never gets used. The debug output also doesn't warn me of failed bindings so I have no idea what is going wrong!


			<GlacialControls:IsNullOrEmptyStringConverter x:Key="isNullOrEmptyStringConverter"/>
			<Style x:Key="Co

Isenabled property in WPF not working on mouse right click



   I set Isenabled =false on a paticular condition using trigger evry thing got disabled but mouse right click is working and Getting selected,can any one let me know how to resolve this issue.


Thanks in Advance

Custom checkbox control 'checked' property is not working .


Hello ,


Iam developing a custom checkbox control deriving from the 'compositecontrol' which i need to use it for a composite control purpose.



public class TngCheckBox : CompositeControl


i have written the required properties which are working fine except the "checked" property. he

asp.net Radio button grouping property is not working



Iam developing a custom server control  of radiobuttton. it is working fine with the all the properties i wrapped  except the grouping . somehow the grouping is not working .

  // this is my class.
 public class TngRadioButton : CompositeControl


// this is my groupname property

[ DefaultValue(""), Themeable(false) ]
        public virtual string GroupName
                string str = (string)this.ViewState["GroupName"];
                if (str != null)
                    return str;
                return string.Empty;
                this.ViewState["GroupName"] = value;


Please  help me in this resolution.




Help with eval stmt not working in a repeater


Hi everyone-

The following works just fine in the code behind:

Dim testState As String
        testState = finalResults(0).ClientTerritoryAppliesToStates(0).State.state

It pulls the first state of the states of the client.  I'm having trouble showing that in a repeater.  The Linq object "finalResults" is bound to the repeater. 

Here's my eval:

Text='<%# Eval("ClientTerritoryAppliesToStates(0).State.state")%>'>

... but it just errors out:  Error: Sys.WebForms.PageRequestManagerServerErrorException: Specified argument was out of the range of valid values.
Parameter name: index

What am I doing wrong with this eval? 

#Eval in server side controls not working (ERROR:too many character in literal)



i have grideview and i want to bind silverlight media control as follow


<asp:Media...etc MediaSource="<%#Eval('Source')%>"




Simple jQuery inside a ListView ItemTemplate: Only 1st row is working?


Here is my js code:

$(document).ready(function () {

    $("#lnkBlocks").text("Show Blocks");

    //Show course blocks
    $("#lnkBlocks").click(function () {
        if ($("#divBlocks:first").is(":hidden")) {
            $("#lnkBlocks").text("Hide Blocks");
        } else {
            $("#lnkBlocks").text("Show Blocks");


Here is my ListView Item Template:

            <a id="lnkBlocks">Show Blocks</a>
            <asp:Label ID="ShortNameLabel" runat="server" Text='<%# Eval("ShortName") %>' />
            <div id="divBlocks" style="display:none;">This is the blocks box</div>


What is happening here and how do I fix it? I will also be enclosing the ListView inside an UpdatePanel later, after I get this fixed. Thanks.

response.redirect eval not working


<% Response.Redirect(Convert.ToString(Eval("FileName")));%>
Eval can not be used in this example:

Databinding methods sucha as Eval (), XPath (),

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Silverlight Simple Animation

Silverlight has several built in techniques for animating controls. Many of these technologies are particularly useful for creating simple animations meant to decorate a web page with eye catching movement that draws the reader's attention. In this post I will skip over these decorative technologies, and instead show how to create a simple animation using a technique similar to those used in many games.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend