Yes, it is possible that your code you posted will work.
I have a button and text box
<asp:Button ID="button" runat="server" /> <input type="text" id="result" name="result" runat="server" />
Uploading to the page I change the identifier of the button and then displaying the result in the text box.
protected void Page_Load(object sender, EventArgs e) { button.ID = "OtherButton"; result.Value = button.ID; }
The result in the text box is "OtherButton"
source share