使用c#获取代码隐藏中的html表行的高度 [英] Get height of an html table row in codebehind using c#

查看:82
本文介绍了使用c#获取代码隐藏中的html表行的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!我有一个用asp.net构建的页面,使用c#作为代码隐藏,带有2个表。 PESO货币为1,另一个是DOLLAR。



我想使用c#将tblPESO的TR高度应用于tblDOLLAR?这怎么可能?



 <   table     id   =   tblPESO     < span class =code-attribute>   runat   =  server >  
< 表格 > < tr id = trBank >
< ; td >
//我这里有一个gridview
< span class =code-keyword>< / td > < / tr > < / table >


< table id = tblDOLLAR runat = server >
< table > < tr id = trBankD >
< td >
// gridview for dollar
< / td >
< / tr >
< / table >







  public   void  setTRHeight()
{
trBankD.Height = trBank.Height;
}





感谢您的帮助!



< b>我尝试了什么:



我尝试获取tblPESO的tr的id并应用于tblDOLLAR的tr,但是无法获得高度。 div class =h2_lin>解决方案





您可以参考以下链接,其中明确提到您如何使用表格的高度属性,从后面的代码到它的行。



代码后面的行高



谢谢,

Sisir Patro


Hi there! I have a page built in asp.net using c# as codebehind with 2 table. 1 for PESO currency and the other is for DOLLAR.

I want to apply the TR height of tblPESO to tblDOLLAR using c#? how is this possible?

<table id="tblPESO"   runat="server">
<table><tr id="trBank">
<td>
//I have a gridview here
</td></tr></table>


<table id="tblDOLLAR"   runat="server">
<table><tr id="trBankD">
<td>
    //gridview for dollar
</td>
</tr>
</table>




public void setTRHeight()
{
   trBankD.Height = trBank.Height;
}



Thanks for your help!

What I have tried:

I tried getting the id of tr of tblPESO and apply to tr of tblDOLLAR, but cant get the height.

解决方案

Hi,

You can refer the following link where it is clearly mentioned how you can use the height property for a table to its row from code behind.

Row height from code behind

Thanks,
Sisir Patro


这篇关于使用c#获取代码隐藏中的html表行的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆