Hi ruben00000,
Please refer the below code.
HTML
<form id="form1" runat="server">
<asp:Label ID="lblRev" runat="server"></asp:Label>
</form>
Code:
C#
protected void Page_Load(object sender, EventArgs e)
{
int a = 1;
string a1 = "ABC";
string b = string.Format("INV/{0}/202408{1}-001", a1, a);
string id = b.Split('-')[1];
lblRev.Text = string.Format("{0}-{1}", b.Split('-')[0], (Convert.ToInt32(id) + 1).ToString().PadLeft(3, '0'));
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim a As Integer = 1
Dim a1 As String = "ABC"
Dim b As String = String.Format("INV/{0}/202408{1}-001", a1, a)
Dim id As String = b.Split("-"c)(1)
lblRev.Text = String.Format("{0}-{1}", b.Split("-"c)(0), (Convert.ToInt32(id) + 1).ToString().PadLeft(3, "0"c))
End Sub
Screenshot