I have following manual code to open the URLs:
<select type="text" name="sel_veh" id="Select1" runat="server" onchange="window.open('http://appsrv01.shakarganj.com.pk:7778/reports/rwservlet?reptest&report=eth_fleet_dtl&veh_num='+ sel_veh.value,'mywindow4');" language="javascript" onclick="return sel_veh_onclick()" style="font-size: 10pt">
<option value="">Please Select</option>
<option value="01-01-12">01-Jan</option>
<option value="01-02-12">02-Jan</option>
<option value="01-02-12">03-Jan</option>
<option value="01-02-12">04-Jan</option>
</select>
I have this select
list with hard-coded date values. The problem is that when date changes, I have to update the code with new dates. Is there any way in C# that I can add values to this select
list by c3 code dynamically that date values should auto change with system date?
Yes, you can. if you're looking into a more coder-friendly control, use the DropDownList control
if you're using a
<select />
, you can add items byfor example
if you're using a
DropDownList
, you can add items by