Loading ...

Error came in project

Who is online?  0 guests and 0 members
home  »  forums   »  codeasp.net community   »  asp.net web hosting   » Error came in project

Error came in project

Posts under the topic: Error came in project

Posted: 11/11/2010

Lurker 170  points  Lurker
  • Joined on: 9/16/2010
  • Posts: 34

Hi Guys,

 

       Can any one tell me how to correct this error. 

 

 

Error 3 Cannot assign to 'Equals' because it is a 'method group' C:\Inetpub\wwwroot\WebSite9\Essay.aspx.cs 41 13 C:\...\WebSite9\

Code:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
public partial class Essay : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        int x,y;
        if (IsPostBack )
        {
            x = int.Parse(DateTime.Now.Minute.ToString());
            y=x;
        }
        y++;
        if ((y - x) == 30)
        {
            
            e.Equals = -1;
            
            
        }
        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
    }
}
Can any one tell me so that i can do it and go forward 
Thanking you,
Vamsidhar

 


Posted: 11/11/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
  Answered

vamsidhar said:

user="vamsidhar janjanam"]e.Equals = -1;


The issue is with this line. You can't assign it. It is a method you need to call like this:

e.Equals(xxxxx);


Posted: 11/11/2010

Lurker 170  points  Lurker
  • Joined on: 9/16/2010
  • Posts: 34

another error came in same code only 

 

Error 3 Use of unassigned local variable 'y' C:\Inetpub\wwwroot\WebSite9\Essay.aspx.cs 37 9 C:\...\WebSite9\

how to make it 


Posted: 11/11/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
  Answered

Initialize the variables

int x = 0, y = 0;


Posted: 11/11/2010

Lurker 170  points  Lurker
  • Joined on: 9/16/2010
  • Posts: 34

Thanks yaar it is working now 


Posted: 11/12/2010

Lurker 170  points  Lurker
  • Joined on: 9/16/2010
  • Posts: 34

Hi ,

 

 

 can any one tell me how to attach a calender to a text box. i tried but not getting can any one tell me.

 

 

thanking you,

j.vamsidhar. 


Posted: 11/12/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
Page 1 of 1 (7 items)