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
saroj bhattacharya
NA
0
42.9k
how to solved Could not load type 'csvfileupload2.Autocomple
Jul 10 2015 5:24 AM
how to solved bellow maintain error
Errror: Could not load type 'csvfileupload2.Autocomplete_demo.
my code
Autocomplete_demo.aspx.cs
is bellow
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web.Services;
namespace csvfileupload2
{
public partial class Autocomplete_demo : System.Web.UI.Page
{
public object prefixText { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
}
public static List<string> getdata(string prefixText)
{
string str = "Data Source=ANIRUDDHA-PC;Initial Catalog=sark;Integrated Security=True";
SqlConnection con = new SqlConnection(str);
con.Open();
SqlCommand cmd = new SqlCommand("select * from frofilerr where name like @name+'%'", con);
cmd.Parameters.AddWithValue("@name", prefixText);
//cmd.Parameters.AddWithValue("@city",);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
List<string> name = new List<string>();
for (int i = 0; i < dt.Rows.Count; i++)
{
name.Add(dt.Rows[i][1].ToString());
}
return name;
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
}
}
}
and my Autocomplete_demo.aspx code is bellow:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Autocomplete_demo.aspx.cs" Inherits="csvfileupload2.Autocomplete_demo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 81px;
}
.style2
{
width: 416px;
}
.style3
{
width: 416px;
font-weight: bold;
text-decoration: underline;
}
.style4
{
width: 81px;
font-weight: bold;
text-decoration: underline;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div><asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager></div>
<table style="width:100%;">
<tr>
<td class="style4">
</td>
<td class="style3">
AutoComplete TextBox using Ajax AutoCompleteExtender</td>
<td>
</td>
</tr>
<tr>
<td class="style1">
</td>
<td class="style2">
</td>
<td>
</td>
</tr>
<tr>
<td class="style1">
</td>
<td class="style2">
<asp:Label ID="Label1" runat="server" ForeColor="#6666FF"
style="font-weight: 700" Text="Search Your Name here"></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td class="style1">
</td>
<td class="style2">
</td>
<td>
</td>
</tr>
<tr>
<td class="style1">
</td>
<td class="style2">
<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" ServiceMethod="getdata" TargetControlID="TextBox1" EnableCaching="true" CompletionInterval="1000" MinimumPrefixLength="1" CompletionSetCount="1" runat="server">
</asp:AutoCompleteExtender>
</td>
<td>
</td>
</tr>
</table>
</form>
</body>
</html>
please help me
Reply
Answers (
2
)
javascirpt and C#
How to get values from google map in a web application