开发者

Take control from one tablespace and put into another in ASP.NET

There's a table on a web form. The table has 4 rows with 3 columns in each. And several buttons are place开发者_Go百科d in these table columns. Let's say in design time Button btnSearch is in the 1st column of the 2nd row of the table. How can I change the buttons location to 3rd column of the 4 row?


The easiest way would probably be with jQuery. Like say:

$('#tableDataToMoveTo').append( $('#btnSearch') );

Where tableDataToMoveTo is the ID of the TD you want to move your button to.

You can download jquery, and read up on its usage, at jquery.com

Edit:

Seeing as how this is a question of showing specific users different buttons, why don't you just use an if statement and only make enough tablerows for the specific user? Like this:

<% if (roleID == 1) {%> (htmlcode for roleid 1 buttons) <%} 
else if (roleID == 2) { %> (htmlcode for roleid 2 buttons) <% } %>

I hope you understand what i mean.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜