Prev: Accessing a Profile Value from a Class
Next: Split
From: Hillbilly on 21 Mar 2010 23:08 // example control declaration <cc1:CollapsiblePanelExtender ID="ControlId" name="[value]" /> I need to learn how to generate a value in the page so the control is configured the way that is needed at runtime. I seem to have forgotten how to write the statement that is written into the HTML to allow me to return a string from a method as the value of the control's name property? Is it name="<%= GetStringMethod() %>"? A literal example; code generates the path to an image the control needs at runime for display in the page. I've started to write the code to get the value and return the string to the caller tonight but I don't remember how to write the expression in the HTML at design-time when I want to test this tomorrow.
From: Aurel on 22 Mar 2010 05:59 "Hillbilly" <nobody(a)nowhere.com> wrote in news:O8CajzWyKHA.3304(a)TK2MSFTNGP06.phx.gbl: > // example control declaration > <cc1:CollapsiblePanelExtender > ID="ControlId" > name="[value]" /> > > I need to learn how to generate a value in the page so the control is > configured the way that is needed at runtime. I seem to have forgotten > how to write the statement that is written into the HTML to allow me > to return a string from a method as the value of the control's name > property? > > Is it name="<%= GetStringMethod() %>"? > > A literal example; code generates the path to an image the control > needs at runime for display in the page. I've started to write the > code to get the value and return the string to the caller tonight but > I don't remember how to write the expression in the HTML at > design-time when I want to test this tomorrow. > > May you have to try this <%# GetStringMethod()%> Aurel
From: Jeff Johnson on 22 Mar 2010 14:01 "Hillbilly" <nobody(a)nowhere.com> wrote in message news:O8CajzWyKHA.3304(a)TK2MSFTNGP06.phx.gbl... > // example control declaration > <cc1:CollapsiblePanelExtender > ID="ControlId" > name="[value]" /> > > I need to learn how to generate a value in the page so the control is > configured the way that is needed at runtime. I seem to have forgotten how > to write the statement that is written into the HTML to allow me to return > a string from a method as the value of the control's name property? > > Is it name="<%= GetStringMethod() %>"? > > A literal example; code generates the path to an image the control needs > at runime for display in the page. I've started to write the code to get > the value and return the string to the caller tonight but I don't remember > how to write the expression in the HTML at design-time when I want to test > this tomorrow. For future reference, this has nothing to do with the C# language and is instead ASP.NET-specific. You'd be much better served asking your question in an ASP.NET group.
From: Hillbilly on 22 Mar 2010 10:04 Thanks, I used <%# but no results. Using the string in the HTML works... CollapsedImage="../App_Themes/FF03_SmokeyBlues/Images/smoke_Help15x15.png" Returning the string does not... CollapsedImage="<%# METROmilwaukee.PageStateManager.GetThemedHelpIcon() %>" // App_Code folder... public static string GetThemedHelpIcon() { return "../App_Themes/FF03_SmokeyBlues/Images/smoke_Help15x15.png"; } Other methods in the PageStateManager class function just fine so no problem with the PageStateManager class that is in App_Code folder. "Aurel" <webgourou(nospam)@hotmail.fr> wrote in message news:Xns9D436FD015F86webgourounospamhotma(a)207.46.248.16... > "Hillbilly" <nobody(a)nowhere.com> wrote in > news:O8CajzWyKHA.3304(a)TK2MSFTNGP06.phx.gbl: > >> // example control declaration >> <cc1:CollapsiblePanelExtender >> ID="ControlId" >> name="[value]" /> >> >> I need to learn how to generate a value in the page so the control is >> configured the way that is needed at runtime. I seem to have forgotten >> how to write the statement that is written into the HTML to allow me >> to return a string from a method as the value of the control's name >> property? >> >> Is it name="<%= GetStringMethod() %>"? >> >> A literal example; code generates the path to an image the control >> needs at runime for display in the page. I've started to write the >> code to get the value and return the string to the caller tonight but >> I don't remember how to write the expression in the HTML at >> design-time when I want to test this tomorrow. >> >> > > > May you have to try this > <%# GetStringMethod()%> > > Aurel
From: Hillbilly on 22 Mar 2010 20:17
Hello Mr. Helpfulski For future reference custom expression builder classes are written in C# not HTML. I'm simply starting a discussion from a point of my own choosing. "Jeff Johnson" <i.get(a)enough.spam> wrote in message news:uk3FAneyKHA.4240(a)TK2MSFTNGP06.phx.gbl... > "Hillbilly" <nobody(a)nowhere.com> wrote in message > news:O8CajzWyKHA.3304(a)TK2MSFTNGP06.phx.gbl... >> // example control declaration >> <cc1:CollapsiblePanelExtender >> ID="ControlId" >> name="[value]" /> >> >> I need to learn how to generate a value in the page so the control is >> configured the way that is needed at runtime. I seem to have forgotten >> how to write the statement that is written into the HTML to allow me to >> return a string from a method as the value of the control's name >> property? >> >> Is it name="<%= GetStringMethod() %>"? >> >> A literal example; code generates the path to an image the control needs >> at runime for display in the page. I've started to write the code to get >> the value and return the string to the caller tonight but I don't >> remember how to write the expression in the HTML at design-time when I >> want to test this tomorrow. > > > For future reference, this has nothing to do with the C# language and is > instead ASP.NET-specific. You'd be much better served asking your question > in an ASP.NET group. > |