.NETGURU
ASPFriends.com 'aspngreuse' list
Up to: Discussion Lists

  • RSS Syndication
  • Latest Discussions Archive
    Dynamically Adding Controls (3 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcontrolsvb] to [aspngreuse] by devin dmrader@sseinc.com Hello, I'm trying to dynamically add controls to a page and pass parameters to those controls as well, but I can't figure out how to do the latter. The hard coded way to do it would be something like: %@ Page language "vb" % %@ Register TagPrefix "my" TagName "Header" Src "/Controls/Header.ascx" % %@ Register TagPrefix "my" T...
    Multiple User Controls on one Page (4 replies)
    ASPFriends.com 'aspngreuse' list
    Hi, I have an ASP.NET page which has 2 instances of a user control which I've created. The control is a table with several text boxes which are populated with text at the time of loading. If I have only one control on the page, everything works as it should BUT when there are two, the boxes are only populated in the second control! I've been struggling with this for ages, can anyone shed any light...
    loadcontrol causing specified cast invalid (3 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcs] to [aspngreuse] by Alex Lowe webmaster@asp grandrapids.net Moved from [aspngcontrolscs] to [aspngcs] by Rachel Reese rachelemilyreese@hotmail.com Hi, I have a usercontrol that is causing a Specificed Cast invalid error on the page which I'm trying to load it from. I'm loading it using the Page.LoadControl method and adding it to a placeholder. When I turn off viewstate on the ...
    Page Templating (16 replies)
    ASPFriends.com 'aspngreuse' list
    Has anyone implemented page templating using the method described in http://www.fawcette.com/vsm/2001 12/magazine/columns/aspnet/default.asp (inheriting your code behind page class from a custom page class using placeholders, etc.)? What are the pros/cons of this approach as regards speed (and maintainability)? It's sounds cool, except it seems that for every page you'd have to have an ASPX that i...
    Controls and Class Library Organization (2 replies)
    ASPFriends.com 'aspngreuse' list
    Is it good practice to keep server controls and general classes in separate files or even assemblies? They work fine in the same file, I'm just trying to get a grip on how to group our code in proper namespaces, and be able to use them in other solutions as well. Thanks for any thoughts or links.
    Loading user controls... (4 replies, VIP)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngwebcontrols] to [aspngreuse] by Swoop Doggy Dogg IronMan@aspelite.com Hello all, I am tasked with creating a Web application for a client using ASP.NET. One of the required features is to facilitate a modular display. I was thinking that I would use user controls to contain data that could then be pushed into a .aspx template. I have a main index.aspx file that contains a series o...
    Composite Controls and adding a form tag programmatically... (2 replies)
    ASPFriends.com 'aspngreuse' list
    I am trying to programmatically add the: form id 3D"Form1" runat 3D"server" tag to a web form from a registered custom control. How should I do this? As a literalcontrol? Is this possible? Thanks!
    User Controls across Domains (5 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcontrolscs] to [aspngreuse] by Alex Lowe webmaster@asp grandrapids.net Is it possible to use User Controls across domains? We have a number of sites originating from the same default domain name, e.g. Site1.domain.com site2.domain.com We are using User Controls for some of the page structure that it common to all sites and are at the moment maintained separately. Is there any easy...
    query (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [winforms cs] to [aspngreuse] by Let the good times roll bbilbro@hotmail.com hi , i am having an asp.net page with c# code behind implementing a simple dropdownlist , now that web control has to be implemented at several places in a given project , so is it possible for me to carry out this thing from a single c# file . That c# file will be populating the dropdownlist at every place . C...
    Object reference not set.. (2 replies)
    ASPFriends.com 'aspngreuse' list
    Anyone see what I'm doing wrong here? I'm using a control (ships.ascx) on my page and I pass to it the value of the parent page. So parentpage (pando.aspx in this case) %@ Page Language 3D"vb" Explicit 3D"True" EnableSessionState 3D"True" smartnavigation 3D"True" Strict 3D"True" % %@ Register TagPrefix 3D"showShips" tagName 3D"shipsBit" src 3D"/cruise/ships.ascx" % %@ import Namespace 3D"System.Da...
    LoadControl from stream (4 replies, VIP)
    ASPFriends.com 'aspngreuse' list
    The LoadControl() method of TemplateControl works nicely for files, but is there any way to do a similar thing for streams? I assume that internally LoadControl is using a FileStream, so it should theoretically be possible. Any ideas? Thanks, Ryan [This E mail scanned for viruses by Declude Virus]
    System.Runtime.Serialization Problem with UserControl (3 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngwebcontrols] to [aspngreuse] by Alex Lowe webmaster@asp grandrapids.net Hi everyone! I'm having one heck of a problem with a user control that I'm writing. I've got a bunch of custom WebControls that I've written and that I'm loading dynamically. They are put into a place holder in a static WebUserControl. When I run my program everything is fine until the controls begin to unload...
    Random numbers in a User Control not so random (5 replies)
    ASPFriends.com 'aspngreuse' list
    Hi, Problem: I am writing some tutorials and am trying to demonstrate a simple example of a random quote generator, provided in a User Control, and then used twice (or more) on an .aspx page. I want to show that the two instances of the user control on the page are independent of each other that the output dynamically created by one is separate from that produced by the other(s). I can get it to w...
    Pass a value to an ASCX file? (4 replies)
    ASPFriends.com 'aspngreuse' list
    Can I? I have an ascx which does a database query and then displays the results in a templated datareader. Part of my sql is where month(hol date) month(dateAdd(m,1,getDate())) What I really want to do is %@ Register TagPrefix "thisMonthsDeals1" TagName "thisMonthsBit1" Src "/get Cheapest.ascx?THEMONTH 1" % %@ Register TagPrefix "thisMonthsDeals1" TagName "thisMonthsBit1" Src "/get Cheapest.ascx?T...
    Dynamic User Control properties... (7 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Tony Stark IronMan@aspelite.com howdy howdy. I've been searching through the afternoon looking for a solution to this problem. I have a DLL with a base page class that I inherit all pages on my web site from... this DLL has the base class and other classes that I use within the site (authentication, etc.). So far, it works well. Every page derives fr...
    How to use the html hidden control? (5 replies, VIP)
    ASPFriends.com 'aspngreuse' list
    Hi all: I want to keep value in hidden field and access it when I click button. I want to use hidden field in my user control ? Any idea ? Thanks
    CrossBrowser TextBox (5 replies)
    ASPFriends.com 'aspngreuse' list
    I was thinking of making a cross browser text box. The MS textbox doesn't support the readonly or enabled attribute for Netscape 4 browsers. This can be simulated by adding an onfocus "blur;" attribute. I've made some dinky server controls. But I haven't seen any examples on how I could inherit the textbox and then add/remove this attribute whenever the readonly or enabled property is set or chang...
    Div in UserControl not rendering in Netscape (2 replies)
    ASPFriends.com 'aspngreuse' list
    Copied from [aspngfreeforall] to [aspngreuse] by Marcie Jones marciejones@yahoo.com I have a div within a usercontrol within a multipage control where I set the innertext property. In IE the text is rendered. In Netscape 4.7 the div is rendered but the innertext is not. Very strange because I can walk throught the debugger and see the value set, but it is only rendered in IE. Any ideas. p.s. works...
    Consuming user control event from inside datagrid/datalist (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngwebcontrols] to [aspngreuse] by Ryan Trudelle Schwarz ryants@aspelite.com Hi, I'm using several user controls inside a datalist edititem template. I've been playing around with getting the focus to move to the right place after a postback initiated by the user control. I already have an event defined that is triggered when the main public property of the control is set, but not su...
    Shared Properties in controls (3 replies)
    ASPFriends.com 'aspngreuse' list
    Hi, what is the best way if I would like to have some properties shared in different custom controls (composite controls), these controls would be quite similar, but to make it easy for our webdesigners I would like to offer different drag/drop controls for them but do not want to write the similare properties in each of these about 10 controls ... Thanks in advance & Greetings Stefan
    Passing variables from ASPX to ASCX (5 replies)
    ASPFriends.com 'aspngreuse' list
    I have a web form which contains a user control. I need to be able to set a variable value in the web form and read it from the user control. I’m using VB.NET. How should I do this? It seems one can’t just read the variables set by the other. Many thanks, Dot Net Guru
    User Control With JavaScript (2 replies)
    ASPFriends.com 'aspngreuse' list
    I have a user control with JavaScript with a button. In IE6 I have to press the button 3 4 times before it executes. Is there something I should know about with JS in user controls? btnLogOut.Attributes.Add("onclick", "window.location 'http:" & ConfigurationSettings.AppSettings("LogOutURL") & "?SignOut yes'") This gets rendered as: input type "submit" name "Header1: ctl0" value "LogOut: 117250" on...
    Getting a value from an ascx (6 replies)
    ASPFriends.com 'aspngreuse' list
    Hi all, this is probably easy but I just can't figure it out. I have a person info page, and all I do is copy a template page to a directory in the name of the person (using FSO at the moment) so that they can access their details by folder, rather than ID (eg www.travelcounsellors.com/briant The page is an ASPX and too complicated to muck about with, so I want an ASCX in the same directory that I...
    Are people having success with page templating and VS.NET? (4 replies)
    ASPFriends.com 'aspngreuse' list
    I'm just curious whether or not people are having success using page templating and Visual Studio .NET? If not, what are the errors you get? If yes, can you share your technique with us? Alex AspFriends.com Moderation Team Microsoft MVP ASP.NET *********************************************************** Translate C# code to VB.NET code at http://aspalliance.com/aldotnet/examples/translate.aspx ***...
    User controls interference (7 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcontrolsvb] to [aspngreuse] by James Avery javery@deluxeeng.com When I add 2 user controls with a buttons to a page, the controls interfere with each other.. The first control has a button which makes a piece of text visible or invisible. The second control is a login (user/pass) with validator and submit button. When I press the button from the first control, the validators of th...
    GAC assembly from inline code (10 replies)
    ASPFriends.com 'aspngreuse' list
    I'm probably doing something silly but when I try to use the following line: %@ Assembly Name 3D"myName, Version 3D1.2.3.4, PublicKeyToken 3Dag629a3va3u1s628 " % It says it cannot find the assembly. Now, the assembly exists in the C:\Windows\Assembly folder, GACUtil shows it as existing, and VS.Net shows it in the GAC. They all show the same information for the dll, so what's the problem? I've als...
    User Control with Link Buttons Question (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngstart] to [aspngreuse] by Marcie Jones marciejones@yahoo.com I have build an user control (ascx with VB) that creates a table with linkbuttons based on data from an XML file. The table rows, cells and linkbuttons are added programmatically. Question: How can I program the click event of the linkbuttons ? Hereunder an example of the (reduced and modified) code: menu.ascx ... ASP:TA...
    User Control question (8 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspug padnug] to [aspngreuse] by Cain Marco juggernaut@aspelite.com Consider a following code section of an ASPX page: myControls:userControl1 id 3D"userControl1" runat 3D"server" / myControls:userControl2 id 3D"userControl2" runat 3D"server" / myControls:userControl3 id 3D"userControl4" runat 3D"server" / myControls:userControl4 id 3D"userControl4" runat 3D"server" / where, userContro...
    Has anybody come up with decent reuse across projects? (4 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngvs] to [aspngreuse] by Bob Levittan blevittan@hotmail.com SITUATION I have one solution containing multiple projects. I want to reuse connection strings and header and footer layouts across my various projects. PROBLEM 1)User controls don't work across applications. 2)Using includes (like we did in Classic ASP) don't seem to be "politically correct". 3)Web services are somewhat sl...
    Server Control Embedded Image (5 replies)
    ASPFriends.com 'aspngreuse' list
    I would like to make a server control (not user control) that kind of replicates Explorer. So there would be a lot of images display/redisplayed (folders, line images, etc.) I don't know how or whether I can use an embedded image to display in the output. The only examples I have seen for displaying images are kind of lame. 1. output the image to the browser in a response (can't have text) 2. spec...
    Page Inheritance in ASP.NET (3 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Clint Barton hawkeye@aspelite.com Hello all, I have an ASP.Net application that uses a Base Page to inherit from. So instead of having my forms inherit System.Web.UI.Page, I inherit my own Page Class. In the base class for all my pages, I'd like to have the default constructor for that page run a check on a session object to test for valid sessions s...
    can not load type 'user control' (5 replies)
    ASPFriends.com 'aspngreuse' list
    I just created a user control in vs.net, but when I build and browse, I get an error that it can not find the namespace in the code behind file. Specifically..."Could not load type 'AlphaBrackets.siteadmin.SiteAdminHeader'." Any ideas? Thanks Stewart
    Accessing User Controls within another user control? (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcontrolscs] to [aspngreuse] by devin devinr@drone interactive.com Hello On my page, I include a header user control, which in turn includes a search user control. I would like to be able to access the search user control and its properties from the main page, but the FindControl methods fails to find it using the following code... Main Page... Control myUC Page.FindControl( "Searc...
    Problem with Nested User Control in Form (7 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Marcie Jones marciejones@yahoo.com Hi, This seems like a really basic question to me... I am trying to create a Web form a postback form. It has text fields and such using HTML server controls. Some of them are standard across many forms/uses, so I am placing them in a separate User Control (.ascx page) so that I can reuse that chunk on multiple form...
    Passing Control's ID (2 replies)
    ASPFriends.com 'aspngreuse' list
    Hello All, I'm working on constructing a function that accepts a label (or even a textbox) and checks to see how many characters are in it. How do I pass in a control's ID to this function? For example, if I have in my page: asp:label id "Label" runat "server" text "blahblah" runat "server" onLoad "CountLetters" / And this in my script tags: Sub CountLetters(Sender As Object, E As EventArgs) Dim N...
    Page Templates Revisited (10 replies)
    ASPFriends.com 'aspngreuse' list
    Hey all, We're implementing Ryan's solution on our site, but we're running into difficulties. In particular, it seems that viewstate is not working on our databound controls. I've made some modifications to Ryan's solution, so I"m wondering if I should start w/ those, or if you could tell me if this is a known issue w/ that solution. Also, since we're adding everything to a "template" user control...
    virtual directory root in asp.net controls (8 replies)
    ASPFriends.com 'aspngreuse' list
    Is there a way to point to a virtual directory root through html in an asp.net control. Here is my problem: my Virtual directory url: http://localhost/myNewWebApp http://localhost/myNewWebApp usercontrol1.ascx looks like this: ! BEGIN HEADER table border "0" cellpadding "3" cellspacing "0" width "100%" align "center" tr td valign "top" img SRC "images/image1.jpg"% " border "0" /td /tr /table hr si...
    Dynamic Control Creation and Object Instantiation (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcs] to [aspngreuse] by devin devinr@drone interactive.com DQogIEknbSB3b3JraW5nIHRocm91Z2ggYSBwcm9qZWN0IGFuZCBoYXZlIGVuY291bnRlcmVkIGEg cXVlc3Rpb24gdGhhdCBhZGRyZXNzZXMgYSBudW1iZXIgb2YgYXJlYXMgaW4gQyMgYW5kIHRoZSAu TkVUIGZyYW1ld29yayAgdGhhdCBJIGRvbid0IHVuZGVyc3RhbmQgdmVyeSB3ZWxsLg0KDQogIEkn bSBkZXZlbG9waW5nIGEgd2ViLWJhc2VkIHB1cmNoYXNlIHJlcXVpc2l0aW9uIGFwcGxpY2F0aW9u IHRoYXQgaXMgaW50Z...
    Webcustomcontrol and Server.MapPath ? (3 replies)
    ASPFriends.com 'aspngreuse' list
    Inside my WebCustomcontrol I cannot use Request.PhysicalApplicationPath or Server.MapPath ??????? I am using the same routines in an .ascx file and it works fine but when I convert to build it all in an .dll assembly as a webcustomcontrol my intellisense tells me these objects are not available Why is it so ? /Johan
    User Custom Controls within User Custom Controls (4 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Marcie Jones marciejones@yahoo.com Hi all, I wrote 2 user custom controls. Now I have a need to put the second user custom control "inside" the first one. For example, if user custom control 1 returns a table with a bunch of rows, I need my user custom control 2 to be in one of the cells within the table. When I alter custom control 1 to create a tag...
    What's the problem with Page_Load? (3 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Marcie Jones marciejones@yahoo.com Hi, I have a simple UserControl that queries a DB and displays the query result in a DropDownList. The page holding the UserControl should have access to the value of the selected item in this DropDownList via a Public Property of the UserControl called "PostedBy" (all code below). The code seems to work fine if I a...
    User Controls - Select Case (2 replies)
    ASPFriends.com 'aspngreuse' list
    I need to put a particular user control, dynamically, based on user selection, in a certain place on my page, but I'm not sure exactly how to do this here is what I've got, but it doesn't work (error below, also): script language "VB" runat "server" Sub dochoice(Source as Object, E as EventArgs) Select Case choice.selecteditem.text Case "owner20" aspx:owner20 runat "server"/ Case "owner" aspx:owne...
    User Control (6 replies)
    ASPFriends.com 'aspngreuse' list
    Hi All ~ If I'm compiling a user control, is there a way I can get it to render from an .ascx file? Or, if I'm inheriting a class, is there a way I can do something comparable? Thanks, Josh
    What is the best way to make a page template? (2 replies)
    ASPFriends.com 'aspngreuse' list
    Hi, I'm currently investigating the best way to make a page template for a web site. I want to be able to create a page template in a WYSIWYG editor that handles the layout of the page. Each page on the website could then use this template for a common look and feel. 20 The two ways that we are plaing with so are: 1) Using a literate at the top and bottom of the ASPX pages, similar to ASP's includ...
    Template User Control (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by devin devinr@drone interactive.com Hi All, I am trying to create a user control to define the page layout. Take for example the snippet of HTML code below: HTML HEAD SCRIPT LANGUAGE 3D'javascript' SRC 3D'js file' /SCRIPT SCRIPT LANGUAGE 3D'javascript' ! // 20 // Set up some variables used by the included javascript var upH 3D 10; var upW 3D 10; 20 //...
    load an aspx on right side (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Yannick Smits dotnet@stepcompany.com Friends, See this webpage layout: 1 Top (webcontrol .ascx) 2 Menu (webcontrol .ascx ) 3 Rigth Side principal (webform .aspx) (1) | | | | | | | (2) | (3) | | | | | | | | | What i want is to load on the Right (3) one aspx, depending of my choose on the menu(2). Note: I know how to load an ascx, but this not what i w...
    Having trouble with codebehind and usercontrols (4 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngfreeforall] to [aspngreuse] by Marcie Jones marciejones@yahoo.com I've created a user control and given it a public property with get/set accessors. Using vs.net, I've dragged&dropped it into an aspx page which has a codebehind page associated with it. I want to set the usercontrols public property within the aspx's codebehind page (I assume in the page load event). When I try to ...
    How to implement web form inheritance (2 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcommunity] to [aspngreuse] by James Avery javery@deluxeeng.com Usually we make all pages of a web site having a common appearance, say, fixed frame areas, headers and footers etc. Of course in .NET we implement every page with a web form. But how can I draw a standard, base webform with some fixed wordings, controls, links etc so that all other pages look the same to it. I guess i...
    Accessing a user control from another usercontrol.. (2 replies)
    ASPFriends.com 'aspngreuse' list
    Is it possible to access a user control (ascx) from another user control on the page? In theory, I would like to be able to do something like this from within the Page Load of the second control.. private void Page Load(object sender, System.EventArgs e) { MyUserControl1 UserControl1 this.Page.Header } .where this.Page.Header is the other user control on the page that I want to access. So far I ha...
    ascx grabbing info from aspx (5 replies)
    ASPFriends.com 'aspngreuse' list
    Moved from [aspngcs] to [aspngreuse] by devin devinr@drone interactive.com How could I pass information from the main page (eg: index.aspx) to a user control (eg: Header.ascx)? The index page would have the Register directive %@ Register TagPrefix "MySite" TagName "Header" Src "Header.ascx" % ...but the Header has no reference to the index page. Thanks, Stewart Haddock
    Visit the archive for messages from this site.
  • May 2001 (2 items)
  • June 2001 (1 item)
  • July 2001 (2 items)
  • September 2001 (2 items)
  • October 2001 (8 items)
  • November 2001 (9 items)
  • December 2001 (3 items)
  • January 2002 (11 items)
  • February 2002 (11 items)
  • March 2002 (13 items)
  • April 2002 (12 items)
  • May 2002 (21 items)
  • June 2002 (16 items)
  • July 2002 (11 items)
  • August 2002 (7 items)
    Ad


    Need Dot Net Interview Questions?
    Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
    .Net Projects
    Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
    Free .net Help
    Commission ExamGuru, Inc. and his team for your next bespoke software project
    FogBUGZ
    The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
    Awesome Tools
    If you don't know about these, you're missing out... IT Certification Questions
    IT Interview Questions
    Free Oracle 10g Training
    MCSE Boortcamp
    Cisco Study Guides
    Cheap Study Guides
    Exact Questions
    Dot Net Interview Questions
    Oracle OCP
    Cheap Travel
    Designer Perfumes - Wholesale Prices
    Free Programming Tutorials
     
    ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
     Copyright © ExamGuru, Inc. 2001-2006
    Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification