Correct Answer

Your webpart have to be inherited from CMSAbstractWebPart class.
So then you can use <%= ValidationHelper.GetString(GetValue("Title"), "") %> in ascx file (be aware that you need add some additional references) or you can define properties in webpart cs file

public string Title
{
get { return ValidationHelper.GetString(GetValue("Title"), "");
}

and then in ascx use just <%= Title %>

Or you can add some controls in ascx file like Literal (<asp:Literal runat="server" ID="ltTitle"/>) and then in cs file add the code to populate this control:

Recent Answers

Public Property Title As String
Get
Return ValidationHelper.GetString(GetValue("Title"), "")
End Get
Set(value As String)
SetValue("Title", MacroContext.CurrentResolver.ResolveMacros(value))
End Set
End Property

It works but in CMS Administration -> Pages application - MyPage -> Design Tab -> MyWebPart it shows following error.
[Error loading the WebPart 'MyWebPart' of type 'MyWebPart']. If I remove above line, it does not show this error.