Atlas client side control value available to server side C# code behind

I have an existing ASP.NET application. The page contains a datagrid (asp:datagrid). In my current C# code behind, I fetch data from SQL Server 2005 and bind to the datagrid when a button is selected (Click event). There can be many entires in the grid however, so the user typically enters text in a textbox as a filter on the returned results from SQL Server 2005.

Now after studying an Atlas sample animalservice, with an HTML suggestion text box, I would like to use client-side Atlas to give the user a better indication of the strength of the filter for the datagrid.  That is, I see the cool autocomplete using an HTML input element: <input id="Text1" type="text" /><span id="Text1__autocomplete"></span>

So using that, the user has a reasonable idea of the effectiveness of the filter, and I then want to be able to populate the existing asp:datagrid, and not a brand new listview that I have to create. Is there a way to pass the current value of  the HTML element "Text1" to the Click method in my C# code behind? Is there a better way to think about the interaction of client-side "suggest" functionality and a subsequent full page refresh?

5/11/2006 12:45:21 AM 9760 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 14


you could use a hidden formfield.
5/11/2006 10:55:40 AM

Could you say a few more words around that? It seems to me that ASP.NET does not generate client side code for hidden text fields (fewer bits to return to the client) so there is nothing in the document object model for Atlas-driven Javascript to set/update. Do you have a simple code snippet that illustrates your suggested approach?

5/11/2006 2:06:54 PM

It turns out that this example <> is exactly what I want.


Here is the relevant fragment for my need -


div id="content">

<h3>AutoComplete server control</h3>

<p>This accesses a server-side repository.</p>

<asp:TextBox ID="tbxServerAutoComplete" runat="server"></asp:TextBox>

<atlas:AutoCompleteExtender runat="server"><atlas:AutoCompleteProperties TargetControlID="tbxServerAutoComplete" Enabled="True" ServicePath="AnimalService.asmx" ServiceMethod="GetCompletionList" minimumprefixlength="1" /></atlas:AutoCompleteExtender>

5/11/2006 5:26:29 PM

Similar Artilces:

How to Pass Information from Server-Side Code to Client-Side Code in AJAX Control Extender?
Hi All,For some reason I can't get the following to work: I have a custom AJAX Control Extender with a few getters and setters. I also have some images I want to use with the extender saved in a resource file. How to I make the respective image URLs available to the javascript of the extender? Are there any examples available?Thanks![Update: renamed the subject to something more appropriate.]  Perhaps I can clarify a bit:I have set up a getter and setter to set the image URL from the resource file: 1 [ExtenderControlProperty] 2 public string CoverURL 3 { 4 get...

How to take value from client side control from server side code?
Hi all, I would like to know that, how to access client side control in server side code? Here is an example.. I am having the textBox in client side like <input type="text" id="textBoxUsername" name="textBoxUsername"/> I need to take the value from this textBox in button click event which is server side code. private void buttonShow(object sender, System.EventArgs e) { //I need to access this textBox here. } How to do that? Thanks R. eswaran. hi you need to make it run at server. <input type="text" id="textBoxUsername"...

How to access dynamically Html controls (client side controls) using C# server side scripts
Folks,I have problem try to to access dynamically Html controls (client side controls) using C# server side scripts. Please give me helps.     The error is as follows Exception Details: System.InvalidCastException: Specified cast is not valid.Source Error: Line 79: { Line 80: Control c = Page.FindControl("ddlTC" + i); Line 81: ((DropDownList)c).DataSource = mdt; Line 82: ((DropDownList)c).DataTextField = "ClassID"; Line 83: ((DropDownList)c).DataValueField = "Course"; My aspx page source codes: ...<...

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in ( required field, range validator and others) question is the required field validator is a server side control. So does that mean that it does a post back? it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

How to get the Client side values in server side code.
Hi all, i have a proble i need to get the client side javascript values in C# code at server side. how can i pass those values? i am using version 1.1, i kno thatwe can use callback events mechnisam in 2.0 or ajax ,apart from that how we can pass? My problem is i need to stop the execution of the code based on after reciving values from the client   any ideas please???   Million thanks RamCheersRam MCP Hello Ram, a common approach is from javascript set an hidden field, then issue a postback. On the server-side, handle the post-back. Feel free to go deeper in your que...

How to read cookies value on client side from server side code?
 I read an article which explains on how to read the client side cookies from C# code by doing something like://Grab the cookie 9: HttpCookie cookie = Request.Cookies[strCookieName];I am very confused here. Server side code in on the server side, so how can a server side code read the cookies on the client machine?I thought that only a client side script like Java Script  can read the client side cookies.Kindly explain...please.thanks.   Each time you request a page on a domain, the browser looks for a cookie for that domain on the client machine if it exists then it ...

Client side code to pass values to server side variable?
Hi there, I have ListBox_SelectedTextChanged() method that creates another list box in the runtime as follows: // Get Action Level List lbxActionLevel = new ListBox();lbxActionLevel.ID = "ddlA" + i.ToString(); lbxActionLevel.Width = 100; lbxActionLevel.Rows = 2;SqlDataReader dr = new BusinessLogicLayer().bllGetActionLevels(); lbxActionLevel.Items.Clear();while (dr.Read()) {ListItem lAction = new ListItem(); lAction.Text = dr.GetString(1).Trim();lAction.Value = Convert.ToString(dr.GetInt32(0)); lbxActionLevel.Items.Add(lAction); lbxActionLevel.SelectedIndex = 0; } I ...

server side control passing value of self in client side function
I have a server side dropdownlist control.It contains values as:"#00FFFF""#FF00FF""#FFFF00"When the selectedindex is changed by the client I want to assign the value of the dropdownlist to a <div id="example"></div> evelement.pseudo:document.getElementbyId('example').bgcolor=dropdownlist.valueHow can I do this? I think I somehow need to attach a function to my dropdownlist which passes its own value as a parameter to a function...any suggestions?Thanks!please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already. You ...

What are diff Server-side control and Client-side control ?
What are diff Server-side control and Client-side control ? and diff server -side coding and client -side coding ? please help I have answered the first part of your question in your previous posting. Server-side coding languages are ASP, ASP.NET, PHP, CGI (Perl) and many, many more. They are used to create dynamic web content (based on additional information that is attached to the request) and are often used to extract information from databases. Client-side coding languages are JavaScript, VBScript, EMACScript and are used to create dynamic content that responds to the u...

Combining a server-side control with a client-side control!
Hi all, I am trying to combine a server-side control with a client-side control. I have created a listbox in both sides, the client-side control's code is: <select size="4" name="lstFruit" id="Select1" ondblclick="lst_dblClick" visible="false"> <option value="Banana">Banana</option> <option value="Apple">Apple</option> <option value="Mango">Mango</option> <option value="Orange">Orange</option> </select> The other one is the server-side control which has this code:   I wanted to add the ondblClick attribute to the se...

client side code & server side code
what is the difference between client side coding & server side coding ? when to use client side & server side code? Client side code runs on the user's browser and includes languages such as javascript and vbscript. Server side code runs on the web server and can be written in languages such as ASP.NET, PHP, ASP, ColdFusion etc. Website Design Darlington - - Experts, Information, Ideas & Knowledge - An online resource for professional ASP.NET developersPlease remember to click "Mark as Answer...

Client Side validation of Calendar control prior to server side selectionchanged event code
Hello, Any thoughts or suggestions regarding this will be greatly appreciated. I have a Calendar control with the validation constraint(can't enter appointments on Holidays or on Thursdays). To create a smoother experience, I'd like for this to be done client side. The dillema is how can I intercept or precede the <asp:calendar> controls selectionchanged event from firing and run my client javascript; passing it to the server if validation succeeds for more intensive processing and database activity. The clientside javascript will need the selected date to deter...

How can I set client side values as server side values?
Hi, Can anyone tell me how I can get client side values such as document.referrer, navigator.appName etc... into server side scripts? There are some client side values I'd like to set as session vars and insert into the db? How do I go about this? Thanks for any pointers Davlon PS (I'm using powersite Pass them as page parameters, e.g., http://myserver/myurl?document.referrer=whatever&navigator.appName=yadayada Then, in your server-side script, just loop through the document.value array and get these values. -- pbm_hopethishelps, Roy Kie...

Client-side values to server-side ?
Hi! My previous query is attached below: I have implemented the below mentioned implementation . 'listbox1' on 'webform1' shows all the values from 'webform2'. I have implemented it using javascript. I would like to know that to implement validation on 'webform1', I would require the values of 'listbox1' ,which are on the client-side , to move to the server-side . I think sending a querystring will be fine but how to implement it using javascript and code-behind(C#)? Your suggestion will be appreciated. Thanks and regards, ap.       My previous query: " I am stuck wi...

Web resources about - Atlas client side control value available to server side C# code behind -

Man Blames The Apple Watch For Burns On His Wrist
The Apple Watch is designed to be worn for extended periods of time on the wrist, which is why it doesn’t come as a surprise that in the past, ...

Stephen Colbert Gives Thanks For Donald Trump
I'd be laughing a little harder if all this fascist was doing was giving comedians like Stephen Colbert some food for fodder. That said I am ...

Jessa Duggar Seewald’s Siblings Star In ‘Ad’ For Fake Money As Critics Boycott ‘Jill & Jessa: Counting ...
Jessa Duggar Seewald’s husband recently enlisted his sisters-in-law to help him film a video that looks an awful lot like an ad for a company ...

Russia warns of 'serious consequences' after Turkey downs warplane
CNN Russia warns of 'serious consequences' after Turkey downs warplane CNN Istanbul (CNN) The conflict in Syria, a years-long maelstrom of ...

Get ready for Li-Fi, a technology 100 times faster than Wi-Fi
The world might eventually have to shift its reliance on Wi-Fi to Li-Fi, an alternative technology that scientists say can reach speeds of 1 ...

Jeff Bezos is proud of his rocket, Elon Musk not impressed
Amazon Founder and CEO Jeff Bezos saw his private spaceflight company, Blue Origin, hit a major milestone today by launching and landing its ...

Cheap Gas Fueling Expanded Thanksgiving Travel Day
Thanksgiving travel begins with gas prices low, terrorism fears high

Amazon May Not Have Requested That NYC Yank Nazi-Themed Ads
Did Amazon Studios really request that its controversial New York City subway ads for the ambitious drama “The Man In The High Castle” be removed? ...

Yet Another Dell Root Certificate Found Out
It looks like things are not all that rosy over at Dell, as yet another Dell root certificate has been discovered, which is in addition to what ...

Security tight after Tunisia bomb blast kills at least 13
At least 13 people were killed in Tuesday's apparent suicide bombing of a Tunisian presidential guard bus in central Tunis, prompting the government ...

Resources last updated: 11/25/2015 10:36:34 AM