ramco1917 says:
ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopUp('" + Title + "', '" + Text + "','" + Type + "');", true)
ClientScript.RegisterStartupScript is used to call the JavaScript function.
It is not used for calling the Server Side function.
So in the else condition call the ShowPopUp.
Or create a function in JavaScript and call using ClientScript.RegisterStartupScript.
For more details refer below article.
RegisterStartupScript: Call JavaScript function with parameters in ASP.Net using C# and VB.Net