0

hi

please help me to do that..

i have one form in asp.net.
In that, i have one dropdownlist box control

and near that one linkbutton "Add",
one hidden textbox is there.

when i click on Add button dropdown will hide and show textbox in their place.

i want to setfocus on that textbox without refreshing page or reloading page.

i have problem with refreshing contain after click on "Add".

so please help me to avoid this reloading or refreshing.

thanks in advance.


jack

5
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by jackparsana
0

server side controls are meant to set off the post-back event (which is the refresh).. if you need a client side operation (i.e. to hide/show an object), then use standard html button with javascript inbuilt as an onclick event

0

Yeah javascript is your way. Turn off the AutoPostback I.E. AutoPostback=False
and write down a small snipet of JavaScript code and call it in the program.

0

use javascript for showhide dropdown and textbox...Using javascript you can change it without refreshing page.
document.getElementById("<%=txtShipping.ClientID%>").style.display = "none";
document.getElementById("<%=dropdownShipping.ClientID%>").style.display = "";

0

use javascript for showhide dropdown and textbox...Using javascript you can change it without refreshing page.
document.getElementById("<%=txtShipping.ClientID%>").style.display = "none";
document.getElementById("<%=dropdownShipping.ClientID%>").style.display = "";

Thanks for reply all

@crishlay :

<%=txtShipping.ClientID%>

What is ClientID?

please help me.


Jack

0

on button click..

$("ddl").hide();
$("txtShow").show();
$('txtShow').focus();

dont forget to download jquery and
dont forget to add jquery refrence in your page !

hope that helps

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.