Pls try. Works for all your cases.
HTML
<asp:TextBox ID="txtNo" runat="server" />
<asp:Button Text="Submit" runat="server" OnClick = "Submit" />
<br />
<asp:Label ID="txtHun" runat="server" />
C#
protected void Submit(object sender, EventArgs e)
{
string hun = "";
string no = txtNo.Text.Trim();
if (no.Length > 2)
{
char[] c = no.ToCharArray();
for (int i = 0; i < c.Length; i++)
{
if (i < 2)
{
hun += c[i].ToString();
}
else
{
hun += "0";
}
}
}
txtHun.Text = hun;
}
VB.Net
Protected Sub Submit(ByVal sender As Object, ByVal e As EventArgs)
Dim hun As String = ""
Dim no As String = txtNo.Text.Trim
If (no.Length > 2) Then
Dim c() As Char = no.ToCharArray
Dim i As Integer = 0
Do While (i < c.Length)
If (i < 2) Then
hun = (hun + c(i).ToString)
Else
hun = (hun + "0")
End If
i = (i + 1)
Loop
End If
txtHun.Text = hun
End Sub