How to Add Button within textbox

Posted by Ravindra.patil under ASP.NET on 12/7/2011 | Points: 10 | Views : 3852 | Status : [Member] | Replies : 1
hi all

I want to add button to multiline textbox.
I tried this way but not succeeded you can also see snopshot attched.


Asp
----------
<div>
<asp:TextBox ID="txt" runat="server" AutoPostBack="true" OnTextChanged="txt_TextChanged" TextMode="MultiLine" ></asp:TextBox>
<asp:Panel ID="Panel1" runat="server" ></asp:Panel>
</div>

C#
----
protected void txt_TextChanged(object sender, EventArgs e)
{
Panel panel1 = new Panel();
panel1.ID = "panel1";
txt.Controls.Add(panel1);
Button btn1 = new Button();
btn1.ID = "btn1";
btn1.Text = "Save";
panel1.Controls.Add(btn1);
}





Responses

Posted by: Hmanjarawala on: 12/8/2011 [Member] Bronze | Points: 25

Up
0
Down
I dont think this is possible with ASP.Net Server controls. ya but, you can achive same with ExtJS toolkit

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Ravindra.patil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response