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. Web Development
  3. DNN Module.

DNN Module.

Scheduled Pinned Locked Moved Web Development
helptutorialquestion
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.
  • K Offline
    K Offline
    khuzwayom
    wrote on last edited by
    #1

    Hi All I am sorry if I am asking this question on a wrong forum. I am working with the DNN PopUp Calendar control, I have a textbox next to it that displays whatever date I choose from the Calendar. I want that textbox to be readonly, but the problem is that if I set the ReadOnly property of the textbox to true, the textbox always defaults back to the default values (today's date) after the postback. But if the ReadOnly property is false it displays the date I chose on the textbox even after the postaback. So I would like to know how to make the textbox readonly but still keep the selected date displayed on the textbox after postback. I initialse the textbox to today's after inside the if(!IsPostback) block. Thank you in advanced for your assistance. Kind Regards MP

    MP

    A 1 Reply Last reply
    0
    • K khuzwayom

      Hi All I am sorry if I am asking this question on a wrong forum. I am working with the DNN PopUp Calendar control, I have a textbox next to it that displays whatever date I choose from the Calendar. I want that textbox to be readonly, but the problem is that if I set the ReadOnly property of the textbox to true, the textbox always defaults back to the default values (today's date) after the postback. But if the ReadOnly property is false it displays the date I chose on the textbox even after the postaback. So I would like to know how to make the textbox readonly but still keep the selected date displayed on the textbox after postback. I initialse the textbox to today's after inside the if(!IsPostback) block. Thank you in advanced for your assistance. Kind Regards MP

      MP

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      khuzwayom wrote:

      I want that textbox to be readonly, but the problem is that if I set the ReadOnly property of the textbox to true, the textbox always defaults back to the default values (today's date) after the postback. But if the ReadOnly property is false it displays the date I chose on the textbox even after the postaback.

      This is not a issue with Dot Net Nuke. If you are doing the same in ASP.NET you will face the same problem. If you make any text box as Read Only it will not send the updated value on post back. Quick Fix : Use ContentEditable="False" instead of Readonly. It will do the trick for you. ;) Solution Approach : 1 .Before Post back read the value in hidden field and after postback place the hidden field value to the textbox ;) 2. You can create your own custom textbox control also. Check here. There was a discussion on same topic 1 year back in CP http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2395528[^] Hope it will help

      cheers, Abhijit CodeProject MVP

      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