RobertSims
06-21-2006, 11:36 AM
I am hitting a wall in two areas here. First, I have two datasets defined. In one of the datasets, it has field named "Index" that I need to use in the second dataset sql statement as the WHERE statement (Where xxx = dataset.Index blah). How do I do this?
Secondly, there is a RadioButtonList (grp) that when it changes, I need it to update Label1.Text. I tried calling a function/sub and continue to fail. How can this be done?
Thanks for your help!
<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="ds1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
CommandText='<%# "SELECT * FROM tblLocations" %>'
Debug="true">
</MM:DataSet>
<MM:DataSet
id="ds2"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
CommandText='<%# "SELECT First, Last, Ext, Direct, Home, Cell FROM Phonelist WHERE Phonelist.Location = 1" %>'
Debug="true"
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<script runat="server">
function ParseIt as string
if grp.SelectedItem.Text <> Nothing
Label1.Text = grp.SelectedItem.Text
end if
end function
</script>
<body>
<form runat="server">
<asp:RadioButtonList BackColor="#FFFFCC" BorderColor="#CCCCCC" BorderWidth="1" DataSource="<%# ds1.DefaultView %>" DataTextField="Full Name" DataValueField="Index" ID="grp" runat="server" RepeatColumns="4" RepeatLayout="table" TextAlign="right" OnSelectedIndexChanged="ParseIt" ></asp:RadioButtonList>
<asp:Label ID="Label1" runat="server" />
</form>
</body>
</html>
Secondly, there is a RadioButtonList (grp) that when it changes, I need it to update Label1.Text. I tried calling a function/sub and continue to fail. How can this be done?
Thanks for your help!
<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="ds1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
CommandText='<%# "SELECT * FROM tblLocations" %>'
Debug="true">
</MM:DataSet>
<MM:DataSet
id="ds2"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
CommandText='<%# "SELECT First, Last, Ext, Direct, Home, Cell FROM Phonelist WHERE Phonelist.Location = 1" %>'
Debug="true"
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<script runat="server">
function ParseIt as string
if grp.SelectedItem.Text <> Nothing
Label1.Text = grp.SelectedItem.Text
end if
end function
</script>
<body>
<form runat="server">
<asp:RadioButtonList BackColor="#FFFFCC" BorderColor="#CCCCCC" BorderWidth="1" DataSource="<%# ds1.DefaultView %>" DataTextField="Full Name" DataValueField="Index" ID="grp" runat="server" RepeatColumns="4" RepeatLayout="table" TextAlign="right" OnSelectedIndexChanged="ParseIt" ></asp:RadioButtonList>
<asp:Label ID="Label1" runat="server" />
</form>
</body>
</html>