View Single Post
  #1 (permalink)  
Old December 16th, 2016, 09:01 PM
dima1954 dima1954 is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Concatenate AppSetting key value into web page control attribute value

Hello,
I have a problem with one of my pages. I need to get the key value from my web.config file as a “prefix”, and concatenate the one with the string. Then assign the resulting string to “myTable” attribute of the control. I’ve tried different approaches, but no lack. I am missing something.
This is the ORIGINAL controls' code:
Code:
<cc1:BaseRadioButtonList ID="rblUserRegisterationType" runat="server" myAutoBind="True"
                                                myBoundField="Type" myTable="vUserRegisterationType" myFieldSet="TextField,ValueField"
                                                myOrder="TextField" DataTextField="TextField" DataValueField="ValueField" myShowSelectFromList="True"
                                                RepeatColumns="2" RepeatDirection="Horizontal" OnSelectedIndexChanged="rblUserRegisterationType_OnSelectedIndexChanged"
                                                AutoPostBack="true" myFilter="" Visible="false">
                                            </cc1:BaseRadioButtonList>
I was trying to get the key value from the web.config file like this, and concatenate the one with an existing myTable string "vUserRegisterationType":

Code:
 <%$AppSettings:LinkedServerHtmlPrefix%> 
, where in the web.config line is:

Code:
 <add key="LinkedServerHtmlPrefix" value="[FWC-VMSD1].[FWC_Users].[dbo]." />
I need to make my final attribute “myTable” looking like this:
myTable="[FWC-VMSD1].[FWC_Users].[dbo].vUserRegisterationType"

Question: how concatenate the string from the web.config and current “vUserRegisterationType”?

Any help will be appreciated.
--Dmitriy
Reply With Quote