how to display a message when click on button

Posted by Srujana under ASP.NET on 4/19/2012 | Points: 10 | Views : 14355 | Status : [Member] | Replies : 12
Hi
I am new to asp.net mvc3 app
I want to display text in text-box when clicking on button in asp.net mvc3 app how to dothis




Responses

Posted by: Sabarimahesh on: 4/19/2012 [Member] Bronze | Points: 25

Up
0
Down
<html><head>

<title>(Type a title for your page here)</title>
<script type="text/javascript">
function show_alert() {
var msg = "Welcome to plus2net.com";
alert(msg);
}
</script>
</head>

<body >

<input type=button value='Click here to display alert message' OnClick="show_alert()">

</body></html>


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

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

Posted by: Dotnetrajanikanth on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
button click function()


me.textbox.text = "Hello"

end sub


____________
www.flickr.com/photos/psdesigner/

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

Posted by: Srujana on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
sorry for the incorrect question
actually my requirement is when i click on button text-box will appear
if u know the answer please send me

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

Posted by: Sakthi.Singaravel on: 4/19/2012 [Member] Silver | Points: 25

Up
0
Down
Button1_Click

TextBox1.Visible = true; 


Form load event:

TextBox1.Visible = false; 



Regards,
Singaravel M

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

Posted by: Srujana on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
how to give button click in asp.net mvc3

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

Posted by: Sunny4989 on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Srujana,

Ur question is initially that text box will not be visible only after the click of that button the text box will be made visible

------------------------------------------------
Learn throughout life

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

Posted by: Srujana on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
yes when clicking the button only the text-box will display

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

Posted by: Dotnetrajanikanth on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
<asp:textbox id="TxtNew" runat="server" visible=false></asp:textbox>


Button Click

button click function()

me.txtnew.text = "your message here"
me.txtnew.visible=true
end sub





____________
www.flickr.com/photos/psdesigner/

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

Posted by: Srujana on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
I want to develop this on asp.net mvc3 app not in asp.net
server side controls(asp.net controls)not working here

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

Posted by: Sunny4989 on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi srujana,

I think this link may help u!!!!!!

http://stackoverflow.com/questions/5613064/jquery-to-enable-and-disable-a-asp-net-button

------------------------------------------------
Learn throughout life

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

Posted by: GSM_GSV on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Srujana,

Refer this link
http://stackoverflow.com/questions/7193660/mvc3-button-click-event

---------------------------------------
Live the life you've dreamed

Regards
MADHU

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

Posted by: Sabarimahesh on: 4/20/2012 [Member] Bronze | Points: 25

Up
0
Down
Asp.net
<asp:textbox id="txtt" style="display:none;" runat="server"></asp:textbox> 


<asp:Button ID="buttonClick" runat="server" style="display:none"  OnClientClick="display('txtt')">   

</asp:TableCell>

<Script>

Function(txtt)
{

var lbl = document.getElementById('txtt');
lbl.style.display="block";
}
</Script>


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

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

Login to post response