Can any one help due to this problem Error 1 'System.Web.UI.Page.Application' is a 'property' but is used like a 'method'

Hi all !

while creating application,session variables i am getting this problem can u suggest any one.

Error 1 'System.Web.UI.Page.Application' is a 'property' but is used like a 'method' 

lokesh


 

-1
kplokesh
4/18/2007 6:41:44 AM
asp.net.web-forms 93655 articles. 3 followers. Follow

2 Replies
618 Views

Similar Articles

[PageSpeed] 10

As a general guideline for seeking help, always show the code that is not working for you.  Your description alone is not enough for us to be able to help you.
 
Alister
1
SomeNewKid
4/18/2007 9:16:47 AM
kplokesh:

Hi all !

while creating application,session variables i am getting this problem can u suggest any one.

Error 1 'System.Web.UI.Page.Application' is a 'property' but is used like a 'method' 

lokesh

Hi lokesh,

Make sure you use the Application as Application itself, not use Application(), Add () behind Applicaiton will cause the above compilation error.

Hope it helps,

Jessica


Jessica Cao
Sincerely,
Microsoft Online Community Support


“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
1
Jessica
4/20/2007 1:33:00 AM
Reply:

Similar Artilces:

'System.Web.UI.IDataItemContainer.DataItem' is a 'property' but is used like a 'method'
On the line "<%# Container.DataItem("BlogID") %>", I get the error listed in the title of this post. I'm not sure why, I use this same for on other pages to get data from a database and I don't get this error.         <asp:GridView ID="GridView1"         runat="server"         AutoGenerateColumns="False"         DataKeyNames="BlogID"        D...

'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)        {    &n...

System.Web.UI.Page.Cache is a 'property' but is used like a 'method'
if (Cache("MyData") == null){ds = myclasslibrary.lookupIDs();  <<filling datasetif (ds != null){if (ds.Tables[0].Rows.Count > 0){ddl.DataTextField = "Text";ddl.DataValueField = "ID";ddl.DataSource = ds;ddl.DataBind();Cache.Insert("MyData", ds, null,DateTime.Now.AddMinutes(5), Cache.NoSlidingExpiration);} }else{ds = ((DataSet) (Cache("MyData")));} error: System.Web.UI.Page.Cache is a 'property' but is used like a 'method'Its all about coding! Change the 2 lines that say Cache("MyData") to be Cache["MyData"] instead.If this post answered your question please remember to ...

''''''''''''''''''''
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...

'System.Web.HttpContext.Session' is a 'property' but is used like a 'method
Hello, I'm trying to set my sessions into a class so I can set and access it easily. I get a 'System.Web.HttpContext.Session' is a 'property' but is used like a 'method' error, can you see what's wrong with my code ?  Thanks  public class SessionManager    {                public static bool isLogged        {            get        &nb...

'''''
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 ...

CS0118: 'System.Web.UI.WebControls.DataGridItem.DataItem' denotes a 'property' where a 'method' was expected
Hai .....,            In my datagrid, I would to display information using this ItemTemplate tag. But when i execute my page, I get the following error:CS0118: 'System.Web.UI.WebControls.DataGridItem.DataItem' denotes a 'property' where a 'method' was expected            In VB.NET, it is working perfectly but in C# it's not. I know to display data using DataBinder.Eval(Container.DataItem, "Field"), but would like Container.DataItem("Field") to work. Regards,HemantThanx and Regar...

Error 1 The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\asse
Once I build project. I encounter this error. Does someone experience this error?Error    1    The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.6.0.0__31bf3856ad364e35\System.Web.Extensions.dll'    D:\Source Code\Linq_Lesson5\Default.aspx    1    1    D:\Source Code\Linq_Lesson5\  It appears tha...

System.Web.UI.Page.Request' denotes a 'property' where a 'method; was expected
i have create a datalist that displays book titles once click the hiperlink takes you to an edit page. the hyperlink looks like this. <asp:hyperlink id="link" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Title" )%>' NavigateURL='<%# Request.ApplicationPath + "/edit.aspx?id=" + DataBinder.Eval(Container.DataItem, "ref_id" ) %>'/> my problem is as follow when i get to the edit page. instead of displaying one record at a time it displays all records one after the other one. I have tried to use the follow...

Compiler Error Message: CS0118: 'System.Web.Caching.Cache' is a 'type' but is used like a 'variable'
What am I missing??????????using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using com.amazon.webservices; using System.Web.Caching; /// <summary> /// Summary description for AmazonWS /// </summary> public class AmazonWS { public AmazonWS() { } public static DataSet AmazonToDataSet(string powersearchstring) { DataSet ds; //is it in the cache? if (Cache[powersearchstring] == null) { //create our query ItemSearchResponse response ...

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...

'System.Web.UI.Control.Context' denotes a 'property' where a 'class' was expected
I get the following error when trying to compile my project. The call to Context lies in a usercontrol. It works fine when called from a page, but how do I call it from a usercontrol? private User _currentUser = new User(Context.User.Identity.Name); 'System.Web.UI.Control.Context' denotes a 'property' where a 'class' was expected Firefox - The browser you can trust Update: private User _currentUser = new User(Context.User.Identity.Name);Is declared inside the class, not in a function. Like: public class Someclass : System.Web.UI.UserControl { private User _currentUser = new...

CS0118: 'objDR' is a 'variable' but is used like a 'method' Error
Hi all , iam getting the above error when iam reading data using Reader can any body tell me what iam doing wrong . Here is code   public bool CheckCredentials(string Username, string Password) {     objConn.Open();     objCmd = new OleDbCommand("SELECT User_Name, Pass FROM Users WHERE User_Name=@givenUsername", objConn);     objCmd.Parameters.AddWithValue("@givenUsername", Username);     objDR = objCmd.ExecuteReader();     if (!objDR.Read()) {         return false;   &nbs...

System.Data.DataSet.Tables' is a 'property' but is used like a 'method'?
     private void PassID(string x)    {        //string strConnection = System.Configuration.ConfigurationManager.ConnectionStrings("FasR6ConnectionString").ConnectionString;        string strConnection = System.Configuration.ConfigurationManager.AppSettings["FasR6ConnectionString"].ToString();         SqlConnection objConnection = new SqlConnection(strConnection);        string query = "spGetEm...

Web resources about - Can any one help due to this problem Error 1 'System.Web.UI.Page.Application' is a 'property' but is used like a 'method' - asp.net.web-forms

Resources last updated: 1/18/2016 8:48:06 PM