Search Results

Search found 3 results on 1 pages for 'philsando'.

Page 1/1 | 1 

  • Programatically loading user controls

    - by PhilSando
    Today's little problem is that I am trying to load user controls from my codebehind like so: Dim myControl As UserControl = Page.LoadControl("~\Modules\Content.ascx")              Controls.Add(myControl)  On running the page myControl is no where to be seen. I wonder why that is? Well after a bit of thought the following come to mind... Am I using the correct code to insert the usercontrol? Is there an alternative available? Does the fact that the usercontrol has a page_load method make a difference? Does the fact that the usercontrol is being called from the page_init method make a difference? Do I need to register the control in my aspx page at design time? I'll be looking to answer these questions as the day goes on!

    Read the article

  • ASP.net repeater control with SQLDataReader as data source

    - by PhilSando
    Here is the markup for the repeater control and its templates: <asp:Repeater ID="Repeater" runat="server"> <HeaderTemplate> <table> <tr> <td colspan="3"><h2>Header information:</h2></td> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><%#Container.DataItem%></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater>  Here is the code to populate it with data:   SQLString = "select something from foo where something"             SQLCommand = New SqlCommand(SQLString, SQLConnection)             SQLConnection.Open()             SQLDReader = SQLCommand.ExecuteReader             If SQLDReader.HasRows Then                 Contactinforepeater.DataSource = SQLDReader                 Contactinforepeater.DataBind()             End If         End If         SQLConnection.Close()         SQLDReader.Close()

    Read the article

  • FxCop ... Where have you been all my life?

    - by PhilSando
    I was recently introduced to microsoft's tool that analyzes managed code assemblies called FxCop. It points out possible design, localization, performance, and security improvements against a pre defined set of rules (and also accepts custom rules). At first I was unsure how to go about using it as it seems to be aimed at software developers (.exe and .dll) . Its easy to get around this with the following steps: 1)Create a new folder (i.e C:\Code Analysis) 2)Publish your web application into the new folder 3)Open FxCop and add all the dll files from the newly created bin folder  to be scrutinized. Lots more info / docs available here on msdn and you can also download fxcop free

    Read the article

1