This topic is locked

How to reference to a page component

3/19/2007 6:59:03 PM
ASPRunner.NET General questions
B
bluezz author

Hi,

I add a customer code on AddOnLoad event,

but the code is writeing to lib.vb,

so, how do I control the add page component,

ex, I want set the PROD_MAINTAIN_ADD.aspx's textbox field name PROD_ID.enabled=false

in PROD_MAINTAIN_ADD.aspx.vb can use ##SHORTTABLENAME##DetailsView.FindControl("fld##SHORTFIELDNAME##"),textbox

but, in lib.vbx, it can't work,

thanks!

Eugene 3/20/2007
  1. Please download update http://www.asprunner.net/source.zip and unzip it into the directory where ASPRunner.NET is installed (C:\Program Files\ASPRunner.NET\).
  2. You should add custom code to events. Please, select "table events" -> "Add page: OnLoad", select action "Custome code" and enter the next code:
    Dim txt As TextBox = Page.PROD_MAINTAINDetailsView.FindControl("fldPROD_ID")
    If Not IsNothing(txt) Then

    txt.Enabled=False

    End If

B
bluezz author 3/25/2007

Hi,

I get the Page.PROD_MAINTAINDetailsView not 'System.Web.UI.Page' member C:\Inetpub\wwwroot\Just\Output\App_Code\PROD_MAINTAIN_events.vb 12 48 C:\...\Output\

thanks!

Eugene 3/26/2007

please send me content of PROD_MAINTAIN_events.vb file.

P
PugMaster 11/15/2007

was there ever a solution to this problem i am getting the same!!!

Eugene 11/16/2007

Please, use the next code:

Dim dv As DetailsView = Page.FindControl("V_TAGOUT_ELECTRICALDetailsView")

Dim ddlComponent_ID As DropDownList = CType(dv.FindControl( "ddlComponent_ID" ), DropDownList)