TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
zeeshan akram
NA
23
1.2k
type or namespace " " does not exist in current context :
Jul 9 2017 3:06 PM
here is the code:
default.aspx.cs
protected void btnSearch_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
GridView1.DataSource =
ServicesBLL
.SearchBuses // here is the error
(ddlFrom.SelectedValue,
ddlTo.SelectedValue,
txtJdate.Text,
ddlBusType.SelectedValue);
GridView1.DataBind();
}
this is ServicesBLL.cs file code
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Data.DataTable;
public class ServicesBLL
{
public DataTable SearchBuses(string fromcity, string tocity, string jdate, string bustype)
{
return ServicesDAL.SearchBuses(fromcity, tocity, jdate, bustype);
}
}
and here is the ServiceDAL code
:
public static DataTable SearchBuses(string fromcity, string tocity, string jdate, string bustype)
{
SqlConnection con = new SqlConnection(Database.ConnectionString);
try
{
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("searchbuses", con);
sda.SelectCommand.Parameters.AddWithValue("@fromcity", fromcity);
sda.SelectCommand.Parameters.AddWithValue("@tocity", tocity);
sda.SelectCommand.Parameters.AddWithValue("@jdate", jdate);
sda.SelectCommand.Parameters.AddWithValue("@bustype", bustype);
sda.SelectCommand.CommandType = CommandType.StoredProcedure;
DataSet ds = new DataSet();
sda.Fill(ds, "buses");
return ds.Tables[0];
}
catch (Exception ex)
{
HttpContext.Current.Trace.Write(
"Error in SearchBuses -->" + ex.Message);
return null;
}
finally
{
con.Close();
}
}
all the remaining things are Fine but same error is generating
plz help
Reply
Answers (
1
)
How can limit the size of file in ajax file upload?
bind json result from controller action to view in ajax