I have an input box generated by
<%= Html.TextBoxFor(model => model.Card.ExpiryDate) %>
which results in the html
<input id="Card_Expiry_Date" name="Card.ExpiryDate" type="text" value="">
I also have javascript function
<script type="text/javascript">
$().ready(function() {
$('#Card_Expiry_Date').datepicker({ dateFormat: 'yy-mm-dd' });
</script>
How can I retrieve the input id that will be generated so that I don't have to hard-code the id in my function?