473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET control using Javascript

I have created a asp.net date picker control using Javascript. I wanted
to do this to avoid doing post back when the calendar window is
launched. It works like charm.

But the challenge is - the control does not use any asp.net controls
like button or textfield. It uses html "input" for the text field and
the button. So after the user has choosen the date and the date is
populated in the textfield, I am not able to get the value from the
textfield into my aspx page.

Can someone throw some light here? I cannot be using AJAX and
microsoft's ATLAS (similair to ajax) is not available until the end of
the year.

Help please. Thanks in advance.

Jun 1 '06 #1
2 3168
If you want to send the text field to the server code behind without
ajax, you will have to do a postback to the server. in the designer u
need to right click the text field and go run as server control. to
grab the control I belive u can reference it directly...

if not then you can go

dim myInputBox as HtmlInputText

myInputBox = page.findcontro l("idOfInputBox ")

then acces the value with myInputBox.valu e

hope that helps
kplkumar wrote:
I have created a asp.net date picker control using Javascript. I wanted
to do this to avoid doing post back when the calendar window is
launched. It works like charm.

But the challenge is - the control does not use any asp.net controls
like button or textfield. It uses html "input" for the text field and
the button. So after the user has choosen the date and the date is
populated in the textfield, I am not able to get the value from the
textfield into my aspx page.

Can someone throw some light here? I cannot be using AJAX and
microsoft's ATLAS (similair to ajax) is not available until the end of
the year.

Help please. Thanks in advance.


Jun 1 '06 #2
I thought I will put the code as well. This is my code inside the
asp.net control. I have left out the javascript.

<div class="body">
<input type="text" id="DateBox" name="dateText" size="15" />
<input type="image" src="Images/SmallCalendar.g if" name="imageBtn"
onclick="return showCalendar('D ateBox', '%Y-%m-%d', '', false);" />
</div>

I need to get the value from "DateBox" into my ascx's property. Is that
possible? If not, any work around?? Thanks.

Jun 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3029
by: mjcast | last post by:
I have been working on an ActiveX control in C#. It is packaged in a Windows Control library and the code is in a user control. The control is used as an automation receiver that is used to update a page dynamically through the use of event listeners in javascript That works, the problem is that when I run the test webpage that runs the ActiveX control, the socket does not start listening for about a minute and a half, after which it runs fine....
2
4371
by: Hawk | last post by:
I have a custom menu control that I am creating using C#. I am rendering HTML from a StringBuilder in my control to add the needed JavaScript to the HTML output. I need to have the JavaScript output from the stringbuilder placed at the bottom of my <BODY> section, after the top navigation menu dropdown dataset output. Currently the JavaScript is output to the top of the <BODY> section of my HTML output from the control. How can I...
0
1940
by: Ron Vecchi | last post by:
Hello, Through using this and many other Microsoft dotnet newsgroups I have been pointed towards many helpful open source projects and articles that have helped a great deal in my studies as well as projects. Recently I have been using a lot of Macromedia Flash Movies within my asp.net pages, as many people have. For those familiar with Flash macromedia can publish the html output for you so you only need to copy/paste to your...
6
1811
by: sck10 | last post by:
Hello, Can you control the window attributes (toolbar, scrollbars, left and right exc.) when using the hyperlink control as you would when using javascript? For examle, I am using the following javascript to open another window and would like to control these attributes with the hyperlink control: window.open(msgSubmitterInfo,t,s);return false" var s="toolbar=no,directories=no,scrollbars=yes,resizable=yes,"; s+= ...
1
5402
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
4
1704
by: Neil Stevens | last post by:
Hi, Merry Christmas to you all. I have a problem with server controls, i am writing a C# ASP.NET web project and i am creating custom server controls for some of the more common element. One example is a NavigationMenu control or a Login control. The problem is that when the page renders, say, the Login control, the ID of the username field is changed from
1
6408
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and binding it to a repeater control. This repeater control has multiple text boxes and buttons. Can you please tell me how can i do paging in this case ? I'm posting my code below. The problem is that if i click on "AdjustThisAd" button, it opens...
0
2485
by: jonathan.beckett | last post by:
I have been working on a client project recently that is using winforms ..NET user controls within web pages in Internet Explorer, and need to find out how to make the user control communicate back to the webpage (typically to tell it that it has finished doing something). I started digging around and found out that I needed to implement a COM interface for the .NET user control, and pick up the events from that in Javascript on the...
2
1412
by: ccgatvolvo | last post by:
Here is the rendered output from my page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head><title>Untitled Page</title></head> <body> <form name="aspnetForm" method="post" action="child.aspx" id="aspnetForm"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
4
4233
by: archana | last post by:
Hi all, i am having one user control. what i want is to add javascript which will gets called on button click of user control. but user control is not working if i add javascript in user control.. but if i add javascript in page in which i am adding user control then that javascript is executed properly. i tested by displaying alert message in javascript. can anyone tell
0
8009
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7939
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6753
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5456
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2442
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1548
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.