CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: how to pass interger value as...

  1. #1
    Join Date
    Jul 2006

    how to pass interger value as...

    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


    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.

  2. #2
    Join Date
    Jul 2001
    Otaki, New Zealand

    Re: how to pass interger value as...

    Is your code running server side or client side?
    ASP.NET 2.0 ?

    I'm not very familiar with this stuff but on client-side don't you just need to get the element by id (getElementById) and then set the width to what you want.

    If server side can't you just reference tbtotal.Width in the same way as you reference lblyes.Text


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)