I have a field called WATER METER READING(Right now its a textbox to take 6 numbers) on my HTml page, but I need to开发者_如何学C change its format to display as [][][][][][] (6 separate small (single digit forms)).... all 6 fields required and all need to be a number.
finally it should look like this.
Water Meter Reading:* [][][][][][]
Any suggestions how to display the values like this.
If I understand your question correctly it seems to me you want 6 separate fields, WATER_METER_READING_1 through WATER_METER_READING_6 and you can combine them into one field WATER_METER_READING when the form is submitted to the server. Consequently to load the data into the 6 fields if you need to edit the form you can just split the field WATER_METER_READING on the server side into the appropriate field.
Are you asking for regex validation? Try [\d][\d][\d][\d][\d][\d]
Could you make 6 very narrow textboxes.
Add validation controls to make them required fields.
In code-behind, read the values from the textboxes, and concatenate them into a single string.
You can have multiple span tags and set the background image of those span to the box look you want.
e.g. <span>0</span><span>9</span><span>5</span><span>7</span><span>8</span>
in css set the background image for this spans to your like.
精彩评论