hoe to prevent a control from being executed

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default hoe to prevent a control from being executed

    I have 2 controls on this page as shown below. The first
    is a datalist control which contains links to the
    particular image gallery (second control) I want to
    display. However I only want the datalist to be used
    when the page is *not* posted back. I know how to hide
    the datalist control and prevent the databinding in the
    code behind from being called if the page is not posted
    back, but because the control contains code that is
    executed at runtime is it not possible to ignore the
    control?? Does this make sense?

    Many Thanks,

    BID


    <asp:datalist id=dlVendors runat="server" CssClass="text">
    <ItemTemplate>

    <%# Container.DataItem("name")%>&nbsp;


    <asp:LinkButton ID="lnkbuttonGallery"
    CommandName="showGallery" CommandArgument='<%#
    Container.DataItem("galleryFolder")%>' Runat="server"
    onCommand="linkButton_command">View
    Gallery</asp:linkbutton><br />

    <ul><li><%# Container.DataItem
    ("description")%></li></ul>

    </ItemTemplate>
    </asp:datalist><BR>



    <rebex:ImageGallery id="imgGallery" runat="server" />
    bid Guest

  2. Similar Questions and Discussions

    1. Can a .as be executed in CF8
      IIRC you can use the import and #include directives using cfformitem type="script" and/or cfsavecontent. Though I do not know if either is...
    2. Prevent certain tags inside custom control
      Hi, I'm not sure if I can ask here as it may be a visual studio specific question, but maybe Is it possible to add a constraint to a custom...
    3. ASPX not executed
      Hi, I'm trying to execute ASPX page on a test IIS Server. Instead of executing it shows the ASPX file on screen. What's happening ?
    4. Prevent 'Chr(13) + Chr(10)' from Being Executed in String
      I have the following code in my web page. Dim tmpReplace As String 'Giving tmpReplace the value from the textbox on the webform. tmpReplace =...
    5. how to prevent prevent .so-calling routine to crash from segfaults in .so
      Hi, Guys I am stuck with a problem and need some help. Platform : Linux(RedHat 7.3) Problem Area : Dynamic Shared Object Libraries, POSIX...
  3. #2

    Default Re: hoe to prevent a control from being executed

    Bid,

    One solution is to put the control you want to hide within a panel control
    and set the visbilty of the panel control to false.

    Reddy


    "bid" <bidllc@hotmail.com> wrote in message
    news:000201c34ec8$4ec0f4c0$a101280a@phx.gbl...
    > I have 2 controls on this page as shown below. The first
    > is a datalist control which contains links to the
    > particular image gallery (second control) I want to
    > display. However I only want the datalist to be used
    > when the page is *not* posted back. I know how to hide
    > the datalist control and prevent the databinding in the
    > code behind from being called if the page is not posted
    > back, but because the control contains code that is
    > executed at runtime is it not possible to ignore the
    > control?? Does this make sense?
    >
    > Many Thanks,
    >
    > BID
    >
    >
    > <asp:datalist id=dlVendors runat="server" CssClass="text">
    > <ItemTemplate>
    >
    > <%# Container.DataItem("name")%>&nbsp;
    >
    >
    > <asp:LinkButton ID="lnkbuttonGallery"
    > CommandName="showGallery" CommandArgument='<%#
    > Container.DataItem("galleryFolder")%>' Runat="server"
    > onCommand="linkButton_command">View
    > Gallery</asp:linkbutton><br />
    >
    > <ul><li><%# Container.DataItem
    > ("description")%></li></ul>
    >
    > </ItemTemplate>
    > </asp:datalist><BR>
    >
    >
    >
    > <rebex:ImageGallery id="imgGallery" runat="server" />

    Srinivasa Reddy K Ganji Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139