J
Jeff
Hey
ASP.NET 2.0
This the ObjectDataSource in my UserControl,
<asp:ObjectDataSource ID="odsMessage" runat="server"
SelectMethod="ExecuteMessage"
TypeName="AH.MyNetwork.BLL.Network.Message">
<SelectParameters>
<asprofileParameter Name="user" PropertyName="UserName"
Type="String" />
<asparameter Name="mode" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
The problem is that I don't know a good way of setting the value of this
parameter "<asparameter Name="mode" Type="Boolean" />" from the web page
in which the UserControl is placed..
This is how I've embedded this UserControl into the web page:
<%@ Register Src="~/Controls/Messages.ascx" TagName="Messages"
TagPrefix="mb" %>
<mb:Messages ID="Messages1" runat="server" />
Maybe I should create a private variable in the UserControl, and set the
ObjectDataSource to reference it, but I don't know how to reference the
private variable from the ObjectDataSource in the markup/source...
My UserControl is designed to show messages (received or sent message). I
have a web page named inbox.aspx where this control is used to show received
message. But now I want to use the same UserControl on a web page named
Outbox.aspx showing sent message. Then I need a way to tell the UserControl
if it's received or sent message it should display
Or maybe I should instead use 2 repeat controls + 2 ObjectDataSource objects
(1 for each repeat control) and hide or show them programatically... if the
UserControl should display received message, then hide the sent message
Repeater and display the Received Reapeater..
Any suggestions?
Jeff
ASP.NET 2.0
This the ObjectDataSource in my UserControl,
<asp:ObjectDataSource ID="odsMessage" runat="server"
SelectMethod="ExecuteMessage"
TypeName="AH.MyNetwork.BLL.Network.Message">
<SelectParameters>
<asprofileParameter Name="user" PropertyName="UserName"
Type="String" />
<asparameter Name="mode" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
The problem is that I don't know a good way of setting the value of this
parameter "<asparameter Name="mode" Type="Boolean" />" from the web page
in which the UserControl is placed..
This is how I've embedded this UserControl into the web page:
<%@ Register Src="~/Controls/Messages.ascx" TagName="Messages"
TagPrefix="mb" %>
<mb:Messages ID="Messages1" runat="server" />
Maybe I should create a private variable in the UserControl, and set the
ObjectDataSource to reference it, but I don't know how to reference the
private variable from the ObjectDataSource in the markup/source...
My UserControl is designed to show messages (received or sent message). I
have a web page named inbox.aspx where this control is used to show received
message. But now I want to use the same UserControl on a web page named
Outbox.aspx showing sent message. Then I need a way to tell the UserControl
if it's received or sent message it should display
Or maybe I should instead use 2 repeat controls + 2 ObjectDataSource objects
(1 for each repeat control) and hide or show them programatically... if the
UserControl should display received message, then hide the sent message
Repeater and display the Received Reapeater..
Any suggestions?
Jeff