double milliseconds=0;
milliseconds = [YourDate].ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds;
<script src="jquery-1.6.2.js"></script>
<script>
function move_forward()
{
//taking the selected items of list 1 and concatenating to a variable named forward_variable.
var forward_variable='';
$("#list1 :selected").each(function(){
forward_variable+="<option value='"+$(this).val()+"'>"+$(this).html()+"</option>";
$(this).remove();
});
//Now appending the selected firs list's element to the list 2.
$("#list2").append(forward_variable);
//Sorting the list 2 so that it shows the list alphabetically
sort_element("list2");
}
function move_backward()
{
var backward_variable='';
//taking the selected items of list 2 and concatenating to a variable named backward_variable.
$("#list2 :selected").each(function(){
backward_variable+="<option value='"+$(this).val()+"'>"+$(this).html()+"</option>";
$(this).remove();
});
//Now appending the selected firs list's element to the list 1.
$("#list1").append(backward_variable);
//Sorting the list 2 so that it shows the list alphabetically
sort_element("list1");
}
//Sorting function to sort the elements
function sort_element(id)
{
var select_element = $('#'+id);
var options_element = select_element.children('option').get();
options_element.sort(function(a, b) {
var compA = $(a).text().toUpperCase();
var compB = $(b).text().toUpperCase();
return (compA < compB) ? -1 : (compA > compB) ? 1 : 0;
})
$.each(options_element, function(index, items) { select_element.append(items); });
}
</script>
<select multiple="multiple" name="list1" id="list1" style="width:200px">
<option value="1">Ecstasy</option>
<option value="2">Tanjim</option>
<option value="3">Rex</option>
<option value="4">Artisti</option>
<option value="5">Infinity</option>
</select>
<input type="button" name="forward" id="forward" onclick="move_forward()" value=">>"/>
<input type="button" name="backward" id="backward" onclick="move_backward()" value="<<"/>
<select multiple="multiple" name="list2" id="list2" style="width:200px">
</select>
<input type='text' name='properties_value' id ='properties_value_1' />
<input type='text' name='properties_value' id ='properties_value_2' />
<input type='text' name='properties_value' id ='properties_value_3' />
<input type='button' onclick='take_all_the_input();' value='Show'/>
<script>
function take_all_the_input()
{
var input1 = $("#properties_value_1").val();
var input2 = $("#properties_value_2").val();
var input3 = $("#properties_value_3").val();
// I assume you just want to alert the values
alert(input1+' ' +input2+' '+input3);
}//end of function
</script>
The above code will work but that is a very novice approach and will not work if you do not know exactly how many text fields will be there. That means if you have generate the text fields dynamically in that case you cant fix the number of text fields. Now come to the solution. The better solution (I am not telling it best but better because after reading this post you may write in your blog even better solution than my solution :) ). So the better solution is go through every text field's id that starts with a particular pattern (in this case 'properties_value_') since every id has started with 'properties_value_' and work on those values. <script>
function take_all_the_input()
{
$("input[id^='properties_value_']").each(function()
{
// I assume you just want to alert the values
alert($(this).val());
}
}//end of function
</script>