3 Replies - 2872 Views - Last Post: 30 June 2011 - 12:34 PM Rate Topic: -----

#1 raghucse2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 14-June 11

ASP.Net/C# - Are you missing a using directive or an assembly referenc

Posted 21 June 2011 - 12:35 AM

hi every body ,
i have some problem with the code which is throwing an error during compilation , some one pls guide me to clear it

my code in c#

using System;
using System.Data;
using System.Configuration;
using System.Collections;
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 System.Reflection;
using System.Data.SqlClient;


public partial class View_proposallist : System.Web.UI.Page
{
protected int allprop = 0;
protected int curprop = 0;
protected int process_id = 0;
protected void Page_Load(object sender, EventArgs e)
{
int gen_id = Convert.ToInt32(Request.QueryString["gen_id"]);
int propstatus = Convert.ToInt32(Request.QueryString["propstatus_id"]);
curprop = Convert.ToInt32(Request.QueryString["curprop"]);
allprop = Convert.ToInt32(Request.QueryString["allprop"] == null ? Session["allprop"] : Request.QueryString["allprop"]);
process_id = Convert.ToInt32((Request.QueryString["process_id"] == null) ? Session["process_id"] : Request.QueryString["process_id"]);
Session["allprop"] = allprop;
//hypimg
//~/images/allprop.gif
//imsstd();
if (Session["process_id"] == null)
{
Response.Redirect("../View/home.aspx");
}
if (curprop > 0)
{
allprop = 0;
Session.Remove("allprop");
}
if(allprop > 0)
{
hypimg.ImageUrl = "../images/curprop.gif";
hypimg.NavigateUrl = "../View/proposallist.aspx?curprop=0";
}
try
{
//if (!IsPostBack)
//{
mas_list ms = new mas_list();
insert obj = new insert();

//Labelproposal.Text = "<div class='aud_link'><a href='../View/proposal_certification.aspx?propreadonly=1 ' target='_blank' >" +/*obj.selectColumn("cic where process_id="+Convert.ToInt32(Session["process_id"]),"Companyname","")*/"Click here to View Proposal" + "</a></div> ";
string[] myFields = new string[] { "Companyname", "prop_no", "prp_date" };
string slt = "SELECT ci.*, po.*, po.process_id AS Expr1,po.id AS Expr2, re.* FROM proposal po,cic ci,review_cic re,new_process ne where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.process_id=ne.id and ci.process_id=" + Convert.ToInt32(Session["process_id"]) + " and po.id=(select max(prop.id) from proposal prop where prop.process_id =ci.process_id ) " + " order by po.prp_date DESC";
if (allprop > 0)
{
slt = "SELECT ci.*, po.*, po.process_id AS Expr1,po.id AS Expr2, re.* FROM proposal po,cic ci,review_cic re,new_process ne where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.process_id=ne.id and po.id=(select max(prop.id) from proposal prop where prop.process_id =ci.process_id ) order by po.prp_date DESC";
}
string her1 = "../View/proposallist.aspx?gen_id=";
//string her1 = "../View/proposallist.aspx_id=";
string her2 = "../View/proposallist.aspx?propstatus_id=";
---->>>>>>>>> error points to this line --> ms.mas_list(myFields, slt, her1, her2, 6, "AuditList", "generate.png", "prp_date", 1, Convert.ToInt32(Session["role"]));
/*string str1 = "proposal where id='15'";//'" + reader["id"].ToString() + "'";
int sel_id = obj.select_value(str1, "prop_status");
Response.Write("sel_id :" + sel_id);*/

if (propstatus > 0)
{
string[] col ={ "prop_status" };
string[] colval = { "1" };
//int sel = obj.select_id("proposal", "process_id", propstatus);
obj.updateTable("proposal", col, colval, propstatus);
Response.Redirect("../View/proposallist.aspx");
}
//Generating word document
if (gen_id > 0)
{
string jscriptstr = "<script type=\"text/javascript\" language=\"JScript\">";
jscriptstr += "try {";
//selecting data from data base
string sqlstat = "proposal where id='" + gen_id + "'";
//int process_id = obj.select_value(sqlstat, "process_id");
string wherecon = "where id='" + gen_id + "'";
string proposal_no = obj.selectColumn("proposal", "prop_no", wherecon);
Utility utility = new Utility();
SqlConnection thisConnection2 = new SqlConnection();
thisConnection2.ConnectionString = utility.getConnection();
thisConnection2.Open();
string logstr = "SELECT * FROM cic ci,proposal po,review_cic re,currency cur where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.currency=cur.id and ci.process_id=" + process_id;
SqlCommand command2 = new SqlCommand(logstr, thisConnection2);
command2.ExecuteNonQuery();
SqlDataReader reader2 =
	


Edit/Delete Message

MOD EDIT: Please use the code tags when posting code :code:

This post has been edited by eclipsed4utoo: 21 June 2011 - 04:31 AM


Is This A Good Question/Topic? 0
  • +

Replies To: ASP.Net/C# - Are you missing a using directive or an assembly referenc

#2 raghucse2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 14-June 11

Re: ASP.Net/C# - Are you missing a using directive or an assembly referenc

Posted 21 June 2011 - 12:48 AM

in the above code i used ------------------>>>>>>>>>> to where i am getting error
this is my error for your clarification ,pl guide me guys


'mas_list' does not contain a definition for 'mas_list' and no extension method 'mas_list' accepting a first argument of type 'mas_list' could be found (are you missing a using directive or an assembly reference?)
Was This Post Helpful? 0
  • +
  • -

#3 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: ASP.Net/C# - Are you missing a using directive or an assembly referenc

Posted 21 June 2011 - 04:37 AM

What is ms? What is mas_list?

It looks like mas_list is some type of object, yet you are trying to use it as a method name.
Was This Post Helpful? 0
  • +
  • -

#4 Moogoo  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 82
  • Joined: 06-January 10

Re: ASP.Net/C# - Are you missing a using directive or an assembly referenc

Posted 30 June 2011 - 12:34 PM

You declare a mas_list(), but on your code I don't see any Class for mas_list, so that may be the problem, that it doesn't exist.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1