Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Retrieving Conrtols custom attribute??

Retrieving Conrtols custom attribute??

Scheduled Pinned Locked Moved C#
tutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zachbob
    wrote on last edited by
    #1

    Hi, I am trying to read in a attribute that I have added to some fields (not all my fields have this attribute). That is what I want to base my loop through all the controls on a page with. Custom attribute is: PDFField ex: now each page can have mutiple or zero "custom" textboxes or any other input types. so far I cant seem to find a way to access each control to find if they have the PDFField attribute. Does anyone know how to do this? Thanks, Zach Bob

    H 1 Reply Last reply
    0
    • Z zachbob

      Hi, I am trying to read in a attribute that I have added to some fields (not all my fields have this attribute). That is what I want to base my loop through all the controls on a page with. Custom attribute is: PDFField ex: now each page can have mutiple or zero "custom" textboxes or any other input types. so far I cant seem to find a way to access each control to find if they have the PDFField attribute. Does anyone know how to do this? Thanks, Zach Bob

      H Offline
      H Offline
      Henrik K Larsen
      wrote on last edited by
      #2

      Hi, Isn't is just to read it using if(txt_Custom1.Attributes["pdffield"] != null) { do anything with it.... } I guess you know how to sweep through all controls in the form. Hope this helps.


      Those who want most to speak up, are often those who have nothing clever to say.

      modified on Friday, June 20, 2008 3:33 AM

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups