Are you implementing IPostBackDataHandler? You can use it to retrieve the value from the input field on postback. Also, you're sample doesn't show a name in the input field... you'll need to output a name in order for the value to be posted back correctly. Check out the sample here...
http://msdn.microsoft.com/en-us/library/system.web.ui.ipostbackdatahandler.aspx
You can use Page.ClientScript.GetPostBackEventReference(...)
to perform an AutoPostBack. For example, if you wanted to postback when the value was changed, you could render something like this:
protected override void Render(HtmlTextWriter writer)
{
string content = string.Format("<input type=\"text\" id=\"txt\" onchange=\"{0}\" />", Page.ClientScript.GetPostBackEventReference(this, null));
writer.Write(content);
}