server side controls in a non-server side form

I want to use server side controls in a non-server side form.
I use server side controls (like dropdownlists) so I can fill them with the right options from the database.
My question is, what is the best way to approach this?
CAN I use server-side controls in a client side form? If so, how can I get the values contained in the controls when I do a post? (not in a querystring).

Here's a sample of my code:


form id="frmAdvancedSearch" method="post" action="advancedSearch.aspx">

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

<input type="submit" />



please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
8/12/2006 11:08:34 AM 91979 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 47


Similar Artilces:

server-side control inside another server-side control
Hi everyone. I have a requirement where I need to create a custom server side control which will contain a series of ASP controls -- no problem there. However, this component also needs to itself be placed inside a server side control, and then placed into the I'll have a custom server-side component inside a custom server-side component. Is that even possible? Everytime I start to think about it I get a headache. Thanks Matt  It's perfectly possible. Just give it a try and you'll see that it works.-- "Mark As Answer" if my reply helped you -- Yup...

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 can I update server side control purely by events triggered by server side timer
Currently I am writing code based on google earth API. Basically server writes a piece of KML info every second,(using AddHandler aTimer.Elapsed, AddressOf OnTimer) then the browser uses XMLHttpRequest to retrieve this KML and display it on the Google Earth plugin. This part works fine, however when there is no more KML to write on the server, I want to disable some buttons running on the server. Unfortunately I cannot achieve it. If I use update method of UpdatePanel (I put those buttons in the UpdatePanel), it pops up the error of "The Update method is called during or after the page...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click ( and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped 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...

Server side code not being parsed on server side
I have a frameset designed to display data for a customer from multiple pages.  the server side script that puts the customer id into the Query String isn't being parsed. The customer's id is in the page's url as ?id=5  The code:<frame src='../Basic/Default.aspx?id=<% Response.Write(Request.QueryString("id")) %>' name="Basic" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />  ruturns this: Server Error in '/Server' Application. Input string was not i...

Is there a correspondance for each server side control to be equivalent to a client side html control
Where can find the list and can use that equivalence and what is its usage plsThanksThanks a lot, I appreciate your taking the time to help me. What exactly do you mean? A correspondence of what?All controls have a ClientID property, which for most controls tells the DOM element ID that will be used in the HTML rendering. Aside from that certain controls might offer additional client-side functionality, but there's no one standard.Thanks,EilonBlog: I mean. When I am using html control in my aspx page like:  <input type=text ..>  and...

How to create a popup from server side after a server side validation
Hi, I am able to popup a window frolm server by adding the following in Page_Load(). imageButton.Attributes["onclick"] = "javascript:return "+"confirm('Are you sure you want to modify ?');"; But now i want to popup conditionally i.e. after a server side validation. If the server side validation fails, only then show a popup. Thanks, asmith. You've got the order of things wrong. The imagebutton's onclick event will fire first, as soon as the button is pressed. The page hasn't submitted yet. Once the page submits, the server side code run...

Get Server-Side's control with $get
Hi, I am a novice at Ajax.NET If I have button with ID="Btn1", how could I use $get('') or take any other measure to retrieve the ref to the button at client-side? Cheers for any help. Ricky.Take nothing on looks; take everything on evidence.- Charles Dickens Try this link: $get('Btn1') Encosia - ASP.NET, AJAX, and more.Latest article: Using complex types to make calling services less… complex Hi, if the server-side Button with Button.ID="Btn1" is insid...

Getting my client-side variable over to server-side
Ok so I have looked at a few posts on this subject and I can't quite figure out how to apply the idea to what I am doing here. I am using javascript to take amounts from 7 different textboxes and add them up on the fly, dropping the total in the 8th textbox. After they fill in that information they click button (postback) to continue throughout the form... what I need is for the "textboxTotalAmt" to move from client-side to server-side.  So I can access that total amount later in the form. Here is the Javascript piece... <script type="text/java...

Server-side versus Client-side controls?
Hi, I'm new to ASP.NET, and I was wondering how negligible the performance impact of using server-side controls over client-side controls is? Should I avoid using server-side controls and use client-side ones whereever I can? Or should I not care? From apurely aesthetic point-of-view, it would be nice to use mostly all server-side controls to keep everything consistent. What are your thoughts on this? Thanks. There are up's and down's of both server-side and client side controls.  Read this article and you will have a better understanding on which is better.http://www.eggh...

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: ...<...

Server Side control invoking a Client Side event
I need to figure out how to get a server side control to process the "OnMouseOver" event. Since server side controls do not have the onmouseover event associated with them, how would you make for example, a DropDownList have a "OnMouseOver" event associate with it? The DropDownList must be server side. I guess the idea here is to set client-side events on the server-side control. Any help will be appreciated. You may try something like this: In server side code DDL1.Attributes.Add("onmouseover", "javascript:alert('Hi')") Th...

Web resources about - server side controls in a non-server side form -

Resources last updated: 12/29/2015 4:14:01 PM