Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 Telerik.Web.UI;
using System.IO;
using System.Data.SqlClient;
using System.Text;
using RKLib.ExportData;

C#
public partial class Ekomaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

C#
protected void rbtnExport_Click(object sender, EventArgs e)

DataSet ds = DataAccessLayer.BindDataQuery("select SiteID,RxDate,Alarms,CommStatus,RoomTemp,AC15EBKWH as LoadKWH,AC15EBTIME AS LoadRunhours,AC15VR as LoadVoltage,AC15IR as LoadCurrent,AC15PF_R as LoadPF,AC15FREQ as LoadFrequency,DC1CH1 as SolarKWH,DC1Cur1 AS SolarCurrent,DC1Volt as SolarVoltage,DC3CH1 as LoadbatterychargingKWH,DC3Cur1 as LoadBatteryChargingCurrent,DC3CH2 as LoadBatteryDischargingKWH,DC3Cur2 AS LoadBatteryDischargingCurrent,DC3Volt as LoadBatteryVoltage,DC4CH1 as BB1ChargingKWH,DC4Cur1 AS BB1ChargingCurrent,DC4CH2 as BB1DisChargingKWH,DC4Cur2 AS BB1DischargingCurrent,DC4Volt as BB1Voltage,PacketType,SrDate from tblSitesData1 WHERE SiteID='" + rcbExportSite.SelectedValue + "' AND RxDate >= '" + FromDate + "' AND RxDate < '" + ToDate + "' Order by RxDate DESC ");
if (ds.Tables[0].Rows.Count > 0)
{
Response.Clear();
ExportExcel export = new ExportExcel();
GridView gvExport = new GridView();
gvExport.DataSource = ds;
gvExport.DataBind();
export.exportGrid(gvExport);
gvExport.Dispose();
}
}
}



I am getting the fallowing error.what is the solution.



VB
Error   2   The type or namespace name 'ExportExcel' could not be found (are you missing a using directive or an assembly reference?)   E:\WORKINGFOLDER\ECOSUN\Ekomaster.master.cs 58  46  E:\WORKINGFOLDER\ECOSUN\
Posted

1 solution

It seems like you didn't put your DLL into the BIN folder, so first you need to do that.
also you need to register this DLL in Web.Config if the first condition does not work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900