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

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:
<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">
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":

, where in the web.config line is:

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

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

Any help will be appreciated.