Rank: Member Groups: Member
Joined: 10/24/2010 Posts: 14
|
hello, I have a small question: how can I access to the "URL" proprietie of dialog control in C#. I want modify the Url="DetailsMedia.aspx?ID={0}" following a selectecdindex of a Gridview. thanks in advance for you support. best regards, Md
Code: C#
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
// int index = GridView1.sel
string url = GridView1.DataKeys[GridView1.SelectedIndex].Value.ToString();
FileExplorerDialog1.InitialState = EO.Web.DialogState.Visible;
//?? (FileExplorerDialog1.FindControl("Explorer1")).url = "DetailsMedia.aspx?ID={url}";
}
Code: HTML/ASPX
<eo:Dialog ID="FileExplorerDialog1" runat="server"
AllowResize="True" CancelButton="Cancel" CloseButtonUrl="00020440"
ControlSkinID="None" HeaderHtml="Dialog Title"
HeaderHtmlFormat="<div style="padding-top:4px">{0}</div>"
HeaderImageHeight="27" HeaderImageUrl="00020441" Height="216px" MinHeight="100"
MinWidth="150" Width="320px" ShowButton="ImageButton1" IsModal="False">
<ContentTemplate><asp:Label runat="server" ID="PathLabel"></asp:Label>
<eo:FileExplorerHolder ID="Explorer1" runat="server" Height="360px"
Width="710px" [b]Url="DetailsMedia.aspx?ID={0}" [/b] >
</eo:FileExplorerHolder>
<div style="padding: 10px 10px 10px 10px; text-align: right;">
<asp:Button ID="OK" runat="server" Style="width: 80px" Text="OK" />
<asp:Button ID="Cancel" runat="server" Style="width: 80px" Text="Cancel" />
</div>
</ContentTemplate>
<FooterStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
<BorderImages BottomBorder="00020409,00020429"
BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430"
LeftBorder="00020406,00020426" RightBorder="00020407,00020427"
TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421"
TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423"
TopRightCornerBottom="00020405,00020425" />
</eo:Dialog>
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You are almost there. You need to call FindControl this way:
Code: C#
FileExplorerHolder holder = (FileExplorerHolder)
FileExplorerDialog1.ContentContainer.FindControl("Explorer1");
holder.Url = .....
The key is you need to call FindControl on the ContentContainer property and also cast the result to the actual type (in this case FileExplorerHOlder). Thanks!
|
Rank: Member Groups: Member
Joined: 10/24/2010 Posts: 14
|
Yes :-),
Thanks a lot, it's work.
Kinds regards,
Md
|