Click here to Skip to main content
15,886,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
antony beula26-Jul-10 5:05
antony beula26-Jul-10 5:05 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
Yusuf26-Jul-10 5:08
Yusuf26-Jul-10 5:08 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. [modified] Pin
antony beula26-Jul-10 5:14
antony beula26-Jul-10 5:14 
Questiondisplaying problem Pin
Dhyanga26-Jul-10 4:35
Dhyanga26-Jul-10 4:35 
AnswerRe: displaying problem Pin
Yusuf26-Jul-10 4:48
Yusuf26-Jul-10 4:48 
GeneralRe: displaying problem Pin
Dhyanga26-Jul-10 4:53
Dhyanga26-Jul-10 4:53 
GeneralRe: displaying problem Pin
Martin Jarvis26-Jul-10 6:51
Martin Jarvis26-Jul-10 6:51 
AnswerRe: displaying problem Pin
Stoffy197226-Jul-10 9:16
Stoffy197226-Jul-10 9:16 
Maybe this is not the easiest solution, but it works for me...

<asp:Repeater runat="server" ID="Repeater1" DataSourceID="dsLocations">
    <HeaderTemplate>
        Items<br />
    </HeaderTemplate>
    <ItemTemplate>
        <b><%# DataBinder.Eval(Container.DataItem, "City") %></b> <b><%# DataBinder.Eval(Container.DataItem, "State") %></b>
        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"LocationID") %>' />
        <asp:Repeater ID="Repeater2" runat="server" DataSourceID="dsUserData">
            <ItemTemplate>
                <p>
                    <%# DataBinder.Eval(Container.DataItem, "LastName") %>,
                    <%# DataBinder.Eval(Container.DataItem, "FirstName") %></br>
                </p>
            </ItemTemplate>
        </asp:Repeater>
        <asp:SqlDataSource ID="dsUserData" runat="server"
            ConnectionString="server=.\SQLEXPRESS;Initial Catalog=LinqTest;Integrated Security=true"
            SelectCommand="SELECT * FROM UserData Where LocationID = @LocationID"
            OnSelecting="dsUserData_Selecting">
            <SelectParameters>
                <asp:Parameter Name="LocationID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </ItemTemplate>
    <SeparatorTemplate>
        <br />
        <br />
        <br />
    </SeparatorTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="dsLocations" runat="server" ConnectionString="server=.\SQLEXPRESS;Initial Catalog=LinqTest;Integrated Security=true" SelectCommand="SELECT * FROM Location"></asp:SqlDataSource>


Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void dsUserData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        HiddenField hf = Repeater1.Controls[1].FindControl("HiddenField1") as HiddenField;
        if (hf == null)
            return;

        e.Command.Parameters[0].Value = hf.Value;
    }
}


Not sure if it works for oracle. Tested with mssql 2005.
GeneralRe: displaying problem Pin
Dhyanga27-Jul-10 2:53
Dhyanga27-Jul-10 2:53 
AnswerRe: displaying problem Pin
aswinnnnnnn26-Jul-10 18:21
aswinnnnnnn26-Jul-10 18:21 
QuestionPopupcontrol extender Pin
Amit Patel198526-Jul-10 4:03
Amit Patel198526-Jul-10 4:03 
AnswerRe: Popupcontrol extender Pin
Yusuf26-Jul-10 4:13
Yusuf26-Jul-10 4:13 
GeneralRe: ModalPopupExtender extender Pin
Amit Patel198526-Jul-10 4:22
Amit Patel198526-Jul-10 4:22 
GeneralRe: ModalPopupExtender extender Pin
saanj27-Jul-10 3:04
saanj27-Jul-10 3:04 
Questiondrop down with check box Pin
Amit Patel198526-Jul-10 3:13
Amit Patel198526-Jul-10 3:13 
AnswerRe: drop down with check box Pin
Not Active26-Jul-10 3:33
mentorNot Active26-Jul-10 3:33 
AnswerRe: drop down with check box Pin
Yusuf26-Jul-10 4:43
Yusuf26-Jul-10 4:43 
QuestionAuto Complete extender problem Pin
Amit Patel198526-Jul-10 3:09
Amit Patel198526-Jul-10 3:09 
Questionhow to avoid loading time while using repeater Pin
prakash.ss8326-Jul-10 2:23
prakash.ss8326-Jul-10 2:23 
AnswerRe: how to avoid loading time while using repeater Pin
Not Active26-Jul-10 2:42
mentorNot Active26-Jul-10 2:42 
AnswerRe: how to avoid loading time while using repeater Pin
Herman<T>.Instance26-Jul-10 3:48
Herman<T>.Instance26-Jul-10 3:48 
GeneralRe: how to avoid loading time while using repeater Pin
Not Active26-Jul-10 4:32
mentorNot Active26-Jul-10 4:32 
AnswerRe: how to avoid loading time while using repeater Pin
T M Gray26-Jul-10 4:22
T M Gray26-Jul-10 4:22 
QuestionIIS configuration error Pin
Ahamed Azeem26-Jul-10 1:49
Ahamed Azeem26-Jul-10 1:49 
AnswerRe: IIS configuration error Pin
Herman<T>.Instance26-Jul-10 3:50
Herman<T>.Instance26-Jul-10 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.