Click to See Complete Forum and Search --> : how to pass interger value as...


asifbhura
05-26-2007, 10:18 AM
hi everyone


I want to pass integer value as width of table.

the code given below is working fine,but i dont know how to put this value in HTML table coe. i tried but it doesnt work

GetYes(Convert.ToInt32(lblyes.Text),Convert.ToInt32(lbltotal.Text));


private int GetYes(int opt, int tot)
{

int i = 100;
per = (i * opt) / tot;
lblyes.Text = per.ToString();
yerper.Text = lblyes.Text+ "%";
return per;

}

now i want to display the per variable to HTML CODE
like i tried

<table bgcolor="blue" id="tbtotal" width='<%=Request.QueryString["per"]%>%'height="20">

this is not working

even i tried like


public int RetPer()
{
return per;
}


<table bgcolor="blue" id="tbtotal" width='<%# RetPer() %>%'height="20">


Please help me out

Waiting for reply.

Cstick
05-26-2007, 01:19 PM
From your second attempt. Don't use binding syntax, using regular code block syntax:


<table bgcolor="blue" id="tbtotal" width="<%= RetPer() %>" height="20">