CS0117: 'System.Web.UI.WebControls.Calendar' does not contain a definition for 'SelectedValue'

am I missing some class info somewhere perhaps?
Any ideas or suggestions would be appreciated!
error being thrown here:
Line 16:                   Calendar1.SelectedValue = ("DueDate");

here is my current code:
<%@ Page EnableViewState="true" Language="C#" AutoEventWireup="true" Inherits="CommunityServer.Controls.CSThemePage" MasterPageFile="tasks.Master" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Register TagPrefix="CSUserControl" TagName="AdTop" src="../Themes/leanandgreen/Common/Ad-Top.ascx" mce_src="../Themes/leanandgreen/Common/Ad-Top.ascx" %>
<%@ Register TagPrefix="CSUserControl" TagName="AdBottom" src="../Themes/leanandgreen/Common/Ad-Bottom.ascx" mce_src="../Themes/leanandgreen/Common/Ad-Bottom.ascx" %>
 <script language="cs" runat="server">
          string Username = CSContext.Current.User.Username;
          void Page_Load()
          {
              TextBox1.Text = Username;
          }
          protected void Cal_DataBound(object sender, EventArgs e)
          {
              if (("DueDate") != null)
              {
                  Calendar Calendar1 = DetailsView1.FindControl("Calendar1") as Calendar;
                  Calendar1.SelectedValue = ("DueDate");
              }
          }
</script>

Thank you,
Gary
"We truly fail, only when we quit."

0
gstadter
4/22/2008 3:33:35 PM
asp.net.personalization 3779 articles. 0 followers. Follow

1 Replies
1034 Views

Similar Articles

[PageSpeed] 51

 I hope this will help:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.calendar.aspx

 

I think you want SelectedDate instead of SelectedValue

0
jennn
4/22/2008 4:58:17 PM
Reply:

Similar Artilces:

Error Message CS0117: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'Text'
I get this Error Message: ( CS0117: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'Text' ) from my Register.aspx when I try to open it. I've added a DropDownList to the Register.aspx page and it throws me this (CS0117 Error message). Could use some help on this. Don't know where and how to correct this problem. If I remove the Dropdownlist and recompile the CustomersDB.cs file, and run the Register.aspx page again then it opens up. But as soon as I add the DropdownList I receive this (Error CS0117). Would appreciate any help. Thank You. TIA. Here is the co...

'System.Web.UI.WebControls.TextBox' does not contain a definition for 'InnerHtml' and ...
Hi,I have the problems (the following is one of those) with the codes below.Error 4 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'InnerHtml' and no extension method 'InnerHtml' accepting a first argument of type 'System.Web.UI.WebControls.TextBox' could be found (are you missing a using directive or an assembly reference?)  Here is the markup file of 'Start.aspx' <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Start.aspx.cs" Inherits="Newsite._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server">    <title>Login Page</title>    <link href="format.css" originalAttribute="href" originalPath=""format.css"" originalAttribute="href" originalPath="format.css" originalAttribute="href" originalPath="format.css" rel="stylesheet" type="text/css" media="screen" /></head><body>    <form id="form1" runat="server">   <b>LOGIN:</b><br />   UserID: <asp:TextBox ID="LoginUser...

'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData'
Hi i have the following problem: Compiler Error Message: CS0117: 'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData' Source Error: Line 59: strvBilled = filepath.ToString(); Line 60: strvPris = tbvPris.Text; Line 61: strvKategori = tbvKategori.drpData.SelectedItem.Value.ToString(); Line 62: strSQL = "INSERT INTO varelist (vNummer, vNavn, vBeskriv, vBilled, vPris, vKategori) Values ("; Line 63: strSQL += strvNummer + ", '"; It should come from this list: <asp:panel ID="tbvKategori" r...

'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'
I am making an asyncronous call to a web service. When the callback happens and my delegate is called, I want to set a text value on a label on my page. In order to do this I need to use Label1.Invoke -- However, when I compile this I get an error'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'I thought all controls should have an Invoke method on it.. I don't understand why I get this error? Any one experience the same thing or have any clue as to what is going on? // we must invoke to get back to the UI thread...this.Label1.Invoke(new La...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

Error Serializing Value 'System.Web.UI.WebCOntrols.TreeNode' of type 'System.Web.UI.WebCOntrols.TreeNode'
Hi, I am  getting the error stated in the subject when i am storing a TreeNode in a ViewState and then using it as follows if (ViewState["ProductCounty"]!=null) { TreeNode _productCountyNode = DataTree.FindNode(((TreeNode)ViewState["ProductCounty"]).ValuePath); _productCountyNode.Expand(); } what could be causing this error? Hi, I believe TreeNode isn't serializable in a way its required for objects which can be put to ViewState - as reference - (TreeNode implements IStateManager and is meant to work together with TreeView itself saving it...

Unable to cast object of type 'System.Web.UI.WebControls.Label' to type 'System.Web.UI.WebControls.TextBox'
I am attempting to "Update" a field in a Datagrid, but no matter what I do (Using either Label or Text Boxes)  I keep getting the same error: Unable to cast object of type 'System.Web.UI.WebControls.Label' to type 'System.Web.UI.WebControls.TextBox' The Error is highlighted below in the Sub... <==THE FIELD THAT CALLS THE ERROR  Any help would be greatly appreciated !!! Thanks !!   The code is as follows... <table border=0 height=210 bordercolor=olive ><tr valign=top><td> <asp:datagrid id="FacilityDataGrid" runat="server" Font-Names="Arial" Font-Size="11px" HorizontalAlign="Left" ItemStyle-Font-Size="x-small" HeaderStyle-Font-Bold="True"HeaderStyle-Font-Size="x-small" AlternatingItemStyle-BackColor="#FFFFFF" Cellpadding="0" BorderWidth="0"AutoGenerateColumns="False" BorderStyle="None" GridLines="None" BorderColor="#404040" Width="75%"DataKeyField="FacilityID"OnUpdateCommand="MyDataGrid_UpdateCommand"OnCancelCommand="MyDataGrid_CancelCommand"OnEditCommand="DG_Combo_Edit"> <AlternatingItemStyle BackColor="#FFFFFF"></AlternatingItemStyle><ItemStyle Font-Size="X-Small"></ItemStyle><HeaderStyle Font-Size="X-Small" Font-Bold="True" ForeCo...

Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.
Hi,  I have a formview with a dropdownlist created dynamically. i want to determine whether the dropdownlist was clicked. the code is written in the FormView1_DataBound method. I get the following error in the line below that is in italics and underlined: Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.   Here is my code: ddl_iFullname = New DropDownList ddl_iFullname.ID = "ddl_iFullname" ddl_iFullname.DataSource = ObjectDataSource3 ddl_iFullname.DataTextField = "fullname" ddl_iFullname.DataValueField = "...

CS0117: 'System.Web.UI.WebControls.Button' does.... 'PerformClick'
Hi all, this is a sort of follow on from a previous post elsewhere. I wish to use PerformClick; according to MSDN and other sources it is in the System.Windows.Forms namespace. I have imported this namepace to my page; however, when the page runs I get the error message: CS0117: 'System.Web.UI.WebControls.Button' does not contain a definition for 'PerformClick' What stupid mistake am I making? CheersKevin I believe you are confusing Web Forms with Windows Forms.  They are not interchangeable.  If you want to generate a click event on a web form, you'll need to use some clie...

'System.Web.UI.Control' does not contain a definition for 'DataItem'
Hi, I am getting this error does anyone knows how to solve this :DHighOnCodingWanna get high! Show us the code that produces this error. Other than the exactness of the error, which explains what is exactly happening, we can't see why this is happening without seeing your code.David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(Please 'Mark as Answer' when i...

'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Calendar'
Hi, Please anybody tell me what this error. I use asp.net MVC Beta. This error showing in gridview too how to rectify it?Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Calendar' and no extension method 'Calendar' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) Source Error: Line 8: Line 9: Mvc Calendar 1: Simplest Calendar Line 10: <%= Html.Calendar() %> Line 11: Line 12:      OOTB, MVC beta 1 doesn't contain html helper for calendar, so I presume you created extension method on your own.In beta 1, all OOTB HTML helpers are now in separate System.Web.Mvc.Html assembly, so you might want to change your extension method code in order to resolve this. In fact, this is probably a source for this error. Try replacing System.Web.Mvc.HtmlHelperwith System.Web.Mvc.Html.HtmlHelper Complete code sample for extension method, controller, and view would be very helpful here.Dragan Panjkov[http://blogpanjkov.qsh.eu/] [http://www.microsoft.com/bih] Here's an example of adding a new HtmlHelper extension method called Calendar.  1 namespace MvcApplication7 2 { 3 using System; 4 using System.Web.Mvc; 5 6 public static class CalendarHelper 7 { 8 public static string Calendar(this HtmlHelper ...

'System.Web.UI.Control' does not contain a definition for 'DataItem'
Hi, I am recieving this error: 'System.Web.UI.Control' does not contain a definition for 'DataItem' What iam trying to do is when a user clicks the hyperlink column in the datagrid then the ID of that user is send to another page and I need to run the Query or something and bind the Label on the page 2 with the name of the Person. So I am using the HTML view and writing something like this : '<%# DataBinder.Eval(Container.DataItem,"Name") %> ' here is my code behind file so how can i bind the Name of the person with the label: private void Page_Lo...

'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'
In my aspx page, I have the following snippet: <%@ Page Language="C#" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="System.Drawing" %>     public System.Drawing.Image Test()    {      ...    }  I keep getting the 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image' error in my Test function (which returns an Image). How do I fix this? Right which is possible; use the full...

Error: Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField'
Hello, I am getting the following error during compiliation. Any suggestions to fix it. Thanks. Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField' protected void gvEvents_RowCommand(Object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow selectedRow = gvEvents.Rows[index]; string sID; ButtonField btn; if (selectedRow.RowType == DataControlRowType.DataRow) { sID = ((ButtonField)selectedRow.FindControl("ID")).DataTextFi...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

CS0117: 'System.Web.Security.MembershipUser' does not contain a definition for 'UserName'
Hi, I export my dataBase1 on others dataBase2. But , now, I have this errors.   Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0117: 'System.Web.Security.MembershipUser' does not contain a definition for 'UserName'Source Error: Line 77: { Line 78: MembershipUser memberUser = Membership.GetUser(); Line 79: if (memberUser.UserName != null && ...

CS0104: 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'
 CS0104: 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'   <%@ Page Language="C#" %> <%@ Import Namespace="System.Drawing" %> <%@Import Namespace="System.Drawing.Imaging" %>   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script type="text/C#" runat="server"> void Page_Load() {//The @ means "Ignore escape characters!" in the following string. It is a verbatim //literal string - any backslashes (and newlines) in...

Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
Hi, any idea why I'm getting the following error?Line 45: protected void CartGrid_RowUpdating(object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e) Line 46: { Line 47: TextBox QuantityTextBox = (TextBox)CartGrid.Rows[e.RowIndex].Cells[2].Controls[0]; Line 48: int Quantity = Convert.ToInt32(QuantityTextBox.Text); Line 49: Are you sure that the control at CartGrid.Rows[e.RowIndex].Cells[2].Controls[0] isn't a LiteralControl?  How are you creating code this in your code?Brent JenkinsASP.NET, C#, Web Developerwww.valewebdesign.co.uk  ...

Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'
Hello, Goal: enter a number in two fields HoursPerUnit and PeoplePerUnit and the value for the third field, TotalHoursPerUnit will populate after the the number in the two fields have been caculated.  Using the code below I receive the error message above.  Please tell me what am I doing wrong? Do I need to cast the text as a literal?  Please help? Thank you in advance, <%@ Page Language="VB" MasterPageFile="Default.master" AutoEventWireup="false" CodeFile="frmHR.aspx.vb" Inherits="frmHR" title="HR" %><asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">    HR<br /><script language =javascript  type="text/javascript">function Calculate(HoursPerUnit, PeoplePerUnit, TotalHoursPerUnit){    TotalHoursPerUnit.value = HoursPerUnit.value * PeoplePerUnit.value;}   </script>    <br />    <asp:LinkButton ID="CheckAll" runat="server">Check All</asp:LinkButton>    <asp:LinkButton ID="UncheckAll" runat="server">Uncheck All</asp:LinkButton><br />    &nbsp;<br />    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="HR...

ASPNET2 HELP! CS0266: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.FileUpload'.
Server Error in '/start-movieposters' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0266: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.FileUpload'. An explicit conversion exists (are you missing a cast?) Source Error: ...

'System.Web.UI.WebControls.DataListItem.DataItem' is a 'property' but is used like a 'method'
 HI I have a datalist with OnItemDataBoundI get the following error when I try to get the DataItem 'System.Web.UI.WebControls.DataListItem.DataItem' is a 'property' but is used like a 'method' , any idea what's wrong with the line ?  public void Item_Bound(object sender, DataListItemEventArgs e)    {        Label originalPriceLabel;        if (e.Item.ItemType == ListItemType.Item | e.Item.ItemType == ListItemType.AlternatingItem)        {            originalPriceLabel = ((Label)(e.Item.FindControl("originalPriceLabel")));            decimal result = Convert.ToDecimal(e.Item.DataItem("originalPrice"));            if (result < 1)            {                originalPriceLabel.Visible = false;            }            else            {                originalPriceLabel.Visible = true;      &nb...

Operator '&' is not defined for types 'String' and 'System.Web.UI.WebControls.TextBox'
Can anyone tell me what this error message means, and what to do to correct it.  Here is the code that has the error:  Dim sql As Stringsql = "INSERT INTO tblConnecting (Date, Member, Name, Company, Phone, Fax, Address, NamesofAttendees, PaymentType, Email) " _ & "Values('" & Today() & "', '" & blnMember & "', '" & Me.txtName.Text & "', '" & Me.txtCompany.Text & "', '" _& Me.txtPhone.Text & "', '" & Me.txtFax.Text &...

DataBinding: 'System.Web.UI.WebControls.EntityDataSourceWrapper' does not contain a property with the name 'OrderID'.
   I followed the steps on how to fix the entityframework the workaround in codeplex( http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=16367) still i got this error. i got this error from http://localhost:1139/WebSite16/Orders/List.aspx then when i choose the Customer Column i can display other column but when it reaches to ORDER and CUSTOMERDEMOGRAPHIC the error pops up. code:    protected void DetailsView1_DataBound(object sender, EventArgs e) { IParserAccessor acessor = (IParserAccessor)sender; var columns = from c in ta...

DataBinding: 'System.Web.UI.WebControls.DropDownList' does not contain a property with the name 'Value'.
i'm using gridview and i'm changing the GRIDVIEW data based on what i have selected in my dropdownlist<asp:DropDownList ID="ddlPageItems" runat="server" Font-Names="Verdana" Font-Size="11px"AutoPostBack="True" OnSelectedIndexChanged="ddlPageItems_SelectedIndexChanged"><asp:ListItem Text="All" Value="0"></asp:ListItem><asp:ListItem Text="ABGY" Value="5"></asp:ListItem><asp:ListItem Text="AFT" Value="10" Selected="True"&...

Web resources about - CS0117: 'System.Web.UI.WebControls.Calendar' does not contain a definition for 'SelectedValue' - asp.net.personalization

Resources last updated: 3/4/2016 8:14:16 AM