Click here to Skip to main content
15,566,394 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Master Detail in asp.net & Transaction Pin
Mazdak5-May-07 2:56
Mazdak5-May-07 2:56 
Questiondatepicker control in asp.net Pin
aransiola5-May-07 1:13
aransiola5-May-07 1:13 
AnswerRe: datepicker control in asp.net Pin
Sathesh Sakthivel5-May-07 1:34
Sathesh Sakthivel5-May-07 1:34 
GeneralRe: datepicker control in asp.net Pin
Arun.Immanuel5-May-07 1:51
Arun.Immanuel5-May-07 1:51 
AnswerRe: datepicker control in asp.net Pin
Naif_Prof5-May-07 2:30
Naif_Prof5-May-07 2:30 
GeneralRe: datepicker control in asp.net Pin
aransiola5-May-07 2:55
aransiola5-May-07 2:55 
GeneralRe: datepicker control in asp.net Pin
Arun.Immanuel5-May-07 3:39
Arun.Immanuel5-May-07 3:39 
Questionproblem using ajax autocompleteextender in ascx page. plese help on urgent basis Pin
Sandeep_Kumbhar5-May-07 1:08
Sandeep_Kumbhar5-May-07 1: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 20:05
Sandeep_Kumbhar7-May-07 20:05 
Questionmaintaining checkboxes in gridview. please reply on urgent basis Pin
Sandeep_Kumbhar5-May-07 0:56
Sandeep_Kumbhar5-May-07 0:56 
AnswerRe: maintaining checkboxes in gridview. please reply on urgent basis Pin
Sathesh Sakthivel5-May-07 1:07
Sathesh Sakthivel5-May-07 1:07 
AnswerRe: maintaining checkboxes in gridview. please reply on urgent basis Pin
Sandeep_Kumbhar7-May-07 20:06
Sandeep_Kumbhar7-May-07 20:06 
Questionhttp to https redirecting problem... Pin
JustChiragPatel5-May-07 0:31
JustChiragPatel5-May-07 0:31 
QuestionCheckboxes in GridView [modified] Pin
Sandeep_Kumbhar4-May-07 23:23
Sandeep_Kumbhar4-May-07 23:23 
AnswerRe: Checkboxes in GridView [modified] Pin
amjad ali shah4-May-07 23:30
amjad ali shah4-May-07 23:30 
AnswerRe: Checkboxes in GridView Pin
Sandeep_Kumbhar5-May-07 0:10
Sandeep_Kumbhar5-May-07 0:10 
AnswerRe: Checkboxes in GridView Pin
Naif_Prof5-May-07 2:33
Naif_Prof5-May-07 2:33 
GeneralRe: Checkboxes in GridView Pin
Sandeep_Kumbhar6-May-07 19:14
Sandeep_Kumbhar6-May-07 19:14 
Questionresizing the columns of a GridView at run time Pin
24891284-May-07 22:31
24891284-May-07 22:31 
AnswerRe: resizing the columns of a GridView at run time Pin
Sathesh Sakthivel4-May-07 22:42
Sathesh Sakthivel4-May-07 22:42 
GeneralRe: resizing the columns of a GridView at run time Pin
24891284-May-07 23:05
24891284-May-07 23:05 
GeneralRe: resizing the columns of a GridView at run time Pin
Sathesh Sakthivel4-May-07 23:39
Sathesh Sakthivel4-May-07 23:39 
QuestionSaving files on the server?? Pin
Nada Adel4-May-07 22:18
Nada Adel4-May-07 22:18 
AnswerRe: Saving files on the server?? Pin
Hesham Amin4-May-07 23:18
Hesham Amin4-May-07 23:18 
AnswerRe: Saving files on the server?? Pin
Blumen6-May-07 21:08
Blumen6-May-07 21: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.