change asp.net textbox name value

$("#<%=APT1.ClientID%>").attr("name")($("#SecureType1").val());

$("#<%=APT2.ClientID%>").val($("#SecureType2").val());

Open in new window


I can change the value, is there a way to change the name?
LVL 9
Seven priceFull StackAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
var newName = $("#SecureType1").val();
$("#<%=APT1.ClientID%>").attr("name", newName );

Open in new window

0
 
Seven priceFull StackAuthor Commented:
ok but when I run it on the server the value i can see in the dom but it will not pass to the server
0
 
leakim971Connect With a Mentor PluritechnicianCommented:
why are you choosing .net technology if you want to hack it behind ?
create a true input instead a texbox (or anything it's)

<input name="nameOfYourChoiceToHackOrNot" value="foo" />

Open in new window

0
 
Seven priceFull StackAuthor Commented:
Thanks again my friend.
0
All Courses

From novice to tech pro — start learning today.