Step 1: Create A Design
<script type="text/javascript">
function NumericDataOnlyWithoutPeriod(e) {
if ((e.which > 47 && e.which < 59) || (e.which == 8) || (e.which == 16) || (e.which == 9) || (e.which == 0) || (e.which == 13)) return;
else e.preventDefault();
}
</script>
<asp:TextBox ID="txtNumber" runat="server" onkeypress="return NumericDataOnlyWithoutPeriod(event);"></asp:TextBox>
<asp:Button ID="btnClick" runat="server" Text="Click" OnClick="btnClick_Click" />
<br />
<br />
<br />
<asp:Label ID="lblValue" runat="server" Text=""></asp:Label>
<br />
<br />
Step 2: Logic Denominationprotected void btnClick_Click(object sender, EventArgs e)
{
int[] no = { 1000, 500, 100, 50, 20, 10, 5, 2, 1 };
int inttxtNo = Convert.ToInt32(txtNumber.Text);
int j = 0;
int k = 0;
string strValue = "";
for (int i = 0; i < no.Length; i++)
{
j = inttxtNo / no[i];
k = j * no[i];
inttxtNo = inttxtNo % no[i];
if (k != 0)
{
strValue = strValue + "<br>" + j + "*" + no[i] + "=" + k;
}
}
lblValue.Text = strValue;
}