Click here to Skip to main content
15,880,392 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to implement time interval in asp.net Pin
souravghosh185-May-09 20:52
souravghosh185-May-09 20:52 
AnswerRe: how to implement time interval in asp.net Pin
Abhishek Sur5-May-09 22:22
professionalAbhishek Sur5-May-09 22:22 
GeneralRe: how to implement time interval in asp.net Pin
souravghosh185-May-09 22:41
souravghosh185-May-09 22:41 
Questionexponential to float value Pin
Member 38798815-May-09 20:33
Member 38798815-May-09 20:33 
QuestionLoading image in textbox(auto complete extender) Pin
md_azy5-May-09 19:52
md_azy5-May-09 19:52 
AnswerRe: Loading image in textbox(auto complete extender) Pin
Spunky Coder5-May-09 20:03
Spunky Coder5-May-09 20:03 
AnswerRe: Loading image in textbox(auto complete extender) Pin
Abhijit Jana5-May-09 20:11
professionalAbhijit Jana5-May-09 20:11 
AnswerRe: Loading image in textbox(auto complete extender) Pin
Bangla Gopal Surya Prakash29-Jun-09 21:32
Bangla Gopal Surya Prakash29-Jun-09 21:32 
1st Approach

<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';

document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';

document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>


Now write this code in Page_Load event of aspx page

protected void Page_Load(object sender, EventArgs e)
{
this.txtAutoComplete.Attributes.Add
("onkeypress", "ShowImage()");
this.txtAutoComplete.Attributes.Add
("onblur", "HideImage()");
}


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


2nd approach


This approach works if you are using newer versions of AjaxControlToolkit.dll (Version 1.0.20229.20821 or later)
For this write the above mentioned javascript in head section of html markup of page.
Now in source of autocomplete extender add OnClientPopulating="ShowImage" and OnClientPopulated="HideImage"

<ajaxToolkit:AutoCompleteExtender runat="server"
ID="AutoComplete1"
BehaviorID="autoComplete"
TargetControlID="txtAutoComplete"
ServicePath="AutoComplete.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="1"
CompletionInterval="10"
EnableCaching="true"
CompletionSetCount="12"
CompletionListCssClass=
"autocomplete_completionListElement"
CompletionListItemCssClass=
"autocomplete_listItem"
CompletionListHighlightedItemCssClass=
"autocomplete_highlightedListItem"
onclientpopulating="ShowImage"
onclientpopulated="HideImage">
</ajaxToolkit:AutoCompleteExtender>



<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';

document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';

document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>
QuestionGridView adds duplicate row on Page refresh Pin
Blumen5-May-09 19:17
Blumen5-May-09 19:17 
AnswerRe: GridView adds duplicate row on Page refresh Pin
Spunky Coder5-May-09 19:54
Spunky Coder5-May-09 19:54 
GeneralRe: GridView adds duplicate row on Page refresh Pin
Blumen5-May-09 20:53
Blumen5-May-09 20:53 
GeneralRe: GridView adds duplicate row on Page refresh Pin
Spunky Coder5-May-09 21:43
Spunky Coder5-May-09 21:43 
QuestionResponse.Redirect() Pin
CodingLover5-May-09 17:50
CodingLover5-May-09 17:50 
AnswerRe: Response.Redirect() Pin
Christian Graus5-May-09 17:55
protectorChristian Graus5-May-09 17:55 
AnswerRe: Response.Redirect() Pin
saanj5-May-09 19:10
saanj5-May-09 19:10 
QuestionCalling another page in side a wizard control in asp.net Pin
meeram3955-May-09 17:25
meeram3955-May-09 17:25 
AnswerRe: Calling another page in side a wizard control in asp.net Pin
Christian Graus5-May-09 17:27
protectorChristian Graus5-May-09 17:27 
AnswerRe: Calling another page in side a wizard control in asp.net [modified] Pin
dotnetmember5-May-09 19:24
dotnetmember5-May-09 19:24 
QuestionChanges in design view not sychronized to source view in VS2008 SP1 Pin
Ethe1st5-May-09 16:45
Ethe1st5-May-09 16:45 
AnswerRe: Changes in design view not sychronized to source view in VS2008 SP1 Pin
saanj5-May-09 19:13
saanj5-May-09 19:13 
GeneralRe: Changes in design view not sychronized to source view in VS2008 SP1 Pin
Ethe1st5-May-09 22:59
Ethe1st5-May-09 22:59 
QuestionSending Email (Using ASP.Net with C# Language) Pin
misCafe5-May-09 15:25
misCafe5-May-09 15:25 
AnswerRe: Sending Email (Using ASP.Net with C# Language) Pin
Christian Graus5-May-09 15:49
protectorChristian Graus5-May-09 15:49 
AnswerRe: Sending Email (Using ASP.Net with C# Language) Pin
saanj5-May-09 19:19
saanj5-May-09 19:19 
AnswerRe: Sending Email (Using ASP.Net with C# Language) Pin
Abhijit Jana5-May-09 19:59
professionalAbhijit Jana5-May-09 19:59 

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.