Insert statement from text box

Hey,

Is there a way i can access a certain textbox in the .asps.cs file code?

I have an insert statement where i have a textbox like so for example:


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

And then in the backend i access it like to txt_title.Text;

This is fine. However i have a calendar popup which is shown:


    <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="js/jquery.dynDateTime.js"></script>
	<script type="text/javascript" src="js/calendar-en.js"></script>
	
	<script type="text/javascript">
	    jQuery(document).ready(function() {
	        jQuery("#dateTimeCustom").dynDateTime({
	            showsTime: true,
	            ifFormat: "%d/%m/%Y %H:%M:%S",
	            daFormat: "%l;%M %p, %e %m, %Y",
	            align: "TL",
	            electric: false,
	            singleClick: false,
	            displayArea: ".siblings('.dtcDisplayArea')",
	            button: ".next()" //next sibling
	        });
	    });
    </script>

    <input type="text" name="dateTimeCust" id="dateTimeCustom"/>
    <button type="button">PICKER</button>

A calendar popup appears when i click on the button. Now i need to insert the textbox value in the database but i cant seem to get access to it in the .cs file. I have tried adding runat=“server” but it then stops the popup from working.

Any ideas what i need to do?

Thanks

Add runat=“server” to your textbox/input. Then change this line:

jQuery(“#dateTimeCustom”).dynDateTime({

to

jQuery(“input[id*=dateTimeCustom]”).dynDateTime({