Click here to Skip to main content
16,016,894 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Master Detail in asp.net & Transaction Pin
Mazdak5-May-07 1:56
Mazdak5-May-07 1:56 
Questiondatepicker control in asp.net Pin
aransiola5-May-07 0:13
aransiola5-May-07 0:13 
AnswerRe: datepicker control in asp.net Pin
Sathesh Sakthivel5-May-07 0:34
Sathesh Sakthivel5-May-07 0:34 
GeneralRe: datepicker control in asp.net Pin
Arun.Immanuel5-May-07 0:51
Arun.Immanuel5-May-07 0:51 
AnswerRe: datepicker control in asp.net Pin
Naif_Prof5-May-07 1:30
Naif_Prof5-May-07 1:30 
GeneralRe: datepicker control in asp.net Pin
aransiola5-May-07 1:55
aransiola5-May-07 1:55 
GeneralRe: datepicker control in asp.net Pin
Arun.Immanuel5-May-07 2:39
Arun.Immanuel5-May-07 2:39 
Questionproblem using ajax autocompleteextender in ascx page. plese help on urgent basis Pin
Sandeep_Kumbhar5-May-07 0:08
Sandeep_Kumbhar5-May-07 0:08 
I am using ajax autocompleteextender. I have declared the service method in the user control itself instead of declaring it in aspx page. But the extender does not work .How can i do it? I want to declare it in ascx page,as i will be reusing the component. i am developing in vs 2005

my master page script
=====================
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true"/asp:ScriptManager>

my aspx page where i am inheriting masterpage
==============================================

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmTestAuto.aspx.cs" Inherits="frmTestAuto" Title="Untitled Page" %>
<%@ Register Src="ctlAutoExtender.ascx" TagName="ctlAutoExtender" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server" /asp:ScriptManagerProxy>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>TEST AUTO PAGE</td>
</tr>
<tr>
<td>uc1:ctlAutoExtender ID="CtlAutoExtender1" runat="server" /</td>
</tr>
<tr>
<td>Footer</td>
</tr>
</table>
</asp:Content>

my ascx page
=============
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlAutoExtender.ascx.cs" Inherits="ctlAutoExtender" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<asp:TextBox runat="server" ID="myTextBox" Width="300" />

<ajaxToolkit:AutoCompleteExtender runat="server" ID="autoComplete1" TargetControlID="myTextBox" Enabled="true"
ServiceMethod="GetCompletionList" ServicePath="ctlAutoExtender.ascx.cs" MinimumPrefixLength="3"
CompletionInterval="1000" EnableCaching="true"
CompletionSetCount="12"/>
</td>
</tr>
</table>


my ascx.cs page
===============

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.Collections.Generic;
using System.Data.SqlClient;
using System.Web.Services;
using System.Web.Script.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]

public partial class ctlAutoExtender : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{

}

[WebMethod]
[ScriptMethod]
public static string[] GetCompletionList(string prefixText, int count)
{
string sql = String.Format("select clt_tVLongNm from mclient where clt_tVLongNm like @companyname + '%'");

List<string> companyList = new List<string>();

using (SqlConnection connection = new SqlConnection("server=192.168.2.57;uid=sa;pwd=d28rg6yp;database=fnocash_report"))

using (SqlCommand command = new SqlCommand(sql, connection))
{
connection.Open();
command.Parameters.AddWithValue("@companyname", prefixText);
using (SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
companyList.Add(reader.GetString(0));
}
}
}
return companyList.ToArray();
}
}


Sandeep Kumbhar
AnswerRe: problem using ajax autocompleteextender in ascx page. plese help on urgent basis Pin
Sandeep_Kumbhar7-May-07 19:05
Sandeep_Kumbhar7-May-07 19:05 
Questionmaintaining checkboxes in gridview. please reply on urgent basis Pin
Sandeep_Kumbhar4-May-07 23:56
Sandeep_Kumbhar4-May-07 23:56 
AnswerRe: maintaining checkboxes in gridview. please reply on urgent basis Pin
Sathesh Sakthivel5-May-07 0:07
Sathesh Sakthivel5-May-07 0:07 
AnswerRe: maintaining checkboxes in gridview. please reply on urgent basis Pin
Sandeep_Kumbhar7-May-07 19:06
Sandeep_Kumbhar7-May-07 19:06 
Questionhttp to https redirecting problem... Pin
JustChiragPatel4-May-07 23:31
JustChiragPatel4-May-07 23:31 
QuestionCheckboxes in GridView [modified] Pin
Sandeep_Kumbhar4-May-07 22:23
Sandeep_Kumbhar4-May-07 22:23 
AnswerRe: Checkboxes in GridView [modified] Pin
amjad ali shah4-May-07 22:30
amjad ali shah4-May-07 22:30 
AnswerRe: Checkboxes in GridView Pin
Sandeep_Kumbhar4-May-07 23:10
Sandeep_Kumbhar4-May-07 23:10 
AnswerRe: Checkboxes in GridView Pin
Naif_Prof5-May-07 1:33
Naif_Prof5-May-07 1:33 
GeneralRe: Checkboxes in GridView Pin
Sandeep_Kumbhar6-May-07 18:14
Sandeep_Kumbhar6-May-07 18:14 
Questionresizing the columns of a GridView at run time Pin
24891284-May-07 21:31
24891284-May-07 21:31 
AnswerRe: resizing the columns of a GridView at run time Pin
Sathesh Sakthivel4-May-07 21:42
Sathesh Sakthivel4-May-07 21:42 
GeneralRe: resizing the columns of a GridView at run time Pin
24891284-May-07 22:05
24891284-May-07 22:05 
GeneralRe: resizing the columns of a GridView at run time Pin
Sathesh Sakthivel4-May-07 22:39
Sathesh Sakthivel4-May-07 22:39 
QuestionSaving files on the server?? Pin
Nada Adel4-May-07 21:18
Nada Adel4-May-07 21:18 
AnswerRe: Saving files on the server?? Pin
Hesham Amin4-May-07 22:18
Hesham Amin4-May-07 22:18 
AnswerRe: Saving files on the server?? Pin
Blumen6-May-07 20:08
Blumen6-May-07 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.