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 asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is 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 - http://mdssolutions.co.ukhttp://lessthandot.com - Experts, Information, Ideas & Knowledgehttp://aspnetlibrary.com - 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 7.1.0.300)
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...