Hi. On the first page of my website the user selects one document
which can be in either English or French. I store that choice in a
class, and I can extract it with:
CType(Session(" UsersSessionCla ss"), UserSessionClas s).SelLanguage
Later in my 'wizard' I have a page which contains this html:
_______________ _______________ _______________ _______________ ______
<form id="frmStep4Con figureDoYous" runat="server">
<%-- Store the language somewhere - it will be used for filtering the
SqlDataSource below --%>
<% Dim strScLang As String%>
<% strScLang = CType(Session(" UsersSessionCla ss"),
UserSessionClas s).SelLanguage% >
<% HyperLinkScorec ardLanguage.Tex t = strScLang%>
<asp:HyperLin k ID="HyperLinkSc orecardLanguage " runat="server"> </
asp:HyperLink>
<div>
_______________ _______________ _______________ _______________ ______
(For some reason I could not assign the language directly to the text
property of the HyperLink).
I can see the language 'FR' or 'EN', depending on the choice on the
first page. So far so good.
In the same page, below, I have the HTML:
_______________ _______________ _______________ _______________ ______
<asp:DropDownLi st ID="cboDoYou"
AppendDataBound Items="True"
DataSourceID="D oYousSqlDataSou rce"
DataTextField=" DoYou"
DataValueField= "DoYou"
runat="server">
</asp:DropDownLis t>
<asp:SqlDataSou rce
ID="DoYousSqlDa taSource"
SelectCommand=" SELECT DISTINCT
Principles.[Principle ID] as PrincipleID,
DoYous.[DoYou Description] as DoYou,
DoYous.[DoYou Language] as ScorecardLangua ge
FROM DoYous_BY_Princ iple_BY_ScType
INNER JOIN Principles
ON DoYous_BY_Princ iple_BY_ScType.[Principle ID] = Principles.
[Principle ID]
INNER JOIN DoYous
ON DoYous_BY_Princ iple_BY_ScType.[DoYou ID] = DoYous.[DoYou ID]"
EnableCaching=" True"
CacheDuration=" 60"
FilterExpressio n="PrincipleI D = {0} AND ScorecardLangua ge = '{1}'"
ConnectionStrin g="Data Source='...."
RunAt="server">
<FilterParamete rs>
<asp:ControlPar ameter ControlID="Hype rLinkPrincipleI D"
PropertyName="T ext" />
<asp:ControlPar ameter ControlID="Hype rLinkScorecardL anguage"
PropertyName="T ext" />
</FilterParameter s>
</asp:SqlDataSour ce>
_______________ _______________ _______________ _______________ ______
Question 1. Although I can clearly see the language in the control
'HyperLinkScore cardLanguage' at the beginning of the page, I can't
reference it in my FilterParameter s, meaning that it does not throw an
error, but it doesn't filter properly either - it populates cboDoYou
with the values from the 'DoYou' column of table DoYous, for the
correct PrincipleID (the one on the current row in the repeater), but
for BOTH EN and FR....
However, if I hardcode the FilterExpressio n to
FilterExpressio n="PrincipleI D = {0} AND ScorecardLangua ge = 'EN'"
or
FilterExpressio n="PrincipleI D = {0} AND ScorecardLangua ge = 'FR'"
it all works great !
If in break mode in the code-behind page I interrogate
HyperLinkScorec ardLanguage.tex t, it returns an empty string (although
I can see 'EN' in the HyperLinkScorec ardLanguage control !), so
therefore I guess I'm not referencing the HyperLinkScorec ardLanguage
control properly in my line
<asp:ControlPar ameter ControlID="Hype rLinkScorecardL anguage"
PropertyName="T ext" />
What is the correct syntax, please ? Where is my problem ?
Question 2. Instead of hardcoding
ConnectionStrin g="Data Source='blah-blah-blah...."
I would like to use the setting from WebConfig
<appSettings>
<add key="Connection String" value="Data Source=..."/>
by using
System.Configur ation.Configura tionManager.App Settings("Conne ctionString")
as in:
ConnectionStrin g='<%=
System.Configur ation.Configura tionManager.App Settings("Conne ctionString")
%>'
but this does not work ! How can I specify the connection string in
this case ?
Thanks a lot !
Alex. 0 1045 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Jenkins |
last post by:
http://www.safenz.org.nz/New/index.htm
Only link working off this currently is the sitemap.
I have all the access keys going except the skip navigation
Please advise if any accessibility issues etc etc
Thanks in advance
Regards
Peter J
|
by: chris kramer |
last post by:
i have an application that allows you to Select some text in a window,
but no option to Copy it to the clipboard (nor does Ctrl-C or
Shift-insert work, or right click etc..) i want to get these values
somehow.
below is the best posted method i have found online.
if anyone can elaborate, as to how to implement such message passing
(as a novice) i would be thrilled. i am using and old visual c++ 4
compiler with
an example program that...
|
by: Erwin Kloibhofer |
last post by:
what if i have a webpage that displays the text "please wait, this may take
a few seconds..." and it now waits until some event on the server happens.
whatever this is, this can be quick, but it could also be slow, or it can
even fail. but once this event has happened, i want the webpage to reload
and display a different message, like "the process completed successfully".
my question now is, how would i achieve this without constant...
|
by: James C. Li |
last post by:
Hi,
I've a windows' form application written in C#. I want to
drag a url's link from a website application onto my
windows' form TreeView control. I've been able to achieve
the following
1.) The description of the mouse consor when draging a
TreeNode within the TreeView control using DragOver event.
2.) Draging TreeNode from one Node to another with the
|
by: Karunakararao |
last post by:
Hi all
Please Convert the VB.Net to C# .NET
Sub CustomPager(ByVal STCPagerGrid As Object)
Dim intCtr As Integer
Static intLastItem As Integer
Static intCount As Integer
Static intTotalPage, lintCurrentPage As Integer
| |
by: Ravi.Gooty |
last post by:
Testing Please ignore this message
|
by: phanimadhav |
last post by:
Hi friends this is my select statement
SELECT user_accountID,Expensive = case quotaAmount
when quotaNo = 'quota1' then sum(quotaAmount) else 0 end
FROM user_accounts
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '='.
whenever i am executing the query this error will be occur please clear this error
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |