troubleshooting Question

<uc1:WebUserControl1 ID="WebUserControl11" runat="server" /> how to make a control return a value

Avatar of goodk
goodkFlag for United States of America asked on
.NET Programming
12 Comments1 Solution1043 ViewsLast Modified:
<html xmlns="" >
<head runat="server">
    <form id="form1" runat="server">

    <% Response.Write(AceYP_Oct2010.App_Code.MPage.mTable());%>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AceYP_Oct2010.App_Code
    public class MPage

        public static string mTable()
            // return "<table bgcolor='brown' width='90%'><tr><td>testing</td></tr><table>";
            string tempstr;

            tempstr = "       <table style='width:100%;'>   <tr> <td bgcolor='#FFFF99' class='style1' colspan='3'>Page Title</td></tr><tr><td bgcolor='#33CC33' width='120'> " + addMenu() + "</td><td width='760'> main content</td> <td>                &nbsp;</td>        </tr>        <tr>            <td bgcolor='#999966' class='style2' colspan='3'>                footer</td>        </tr>    </table> ";

            return tempstr;


        public static string addMenu()

                    <uc1:WebUserControl1 ID="WebUserControl11" runat="server" />
            return tempstr;

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros