Forum  General Visual ...  How do I...?  Usercontrol script
Previous Previous
 
Next Next
New Post 7/23/2012 6:03 AM
  pex
8 posts
No Ranking


Usercontrol script 

Hi, 

I have a usercontrol containing 3 panels. 1 panel with columnheaders, one with rowheaders and one with a grid of cells. Only the cell grid panel has scrollbars. I have a javascript  to control the scrolling of the row and column headers so they line up with each other.

How do I attach this script to the usercontrol, so when the usercontrol is used, the script is sent to the client? The usercontrol is in a VWG library.

 
New Post 7/28/2012 1:02 PM
  palli
14326 posts
1st Level Poster




Re: Usercontrol script 

 Hi pex,

The options you have are:

  1. Include the script on application level. See Project's properties / Registration / Includes.
  2. Create a custom Theme and add your script as a script resource to that theme.
  3. Create a custom Control, inheriting from UserControl and add your script as a script resource to that control.

Option 2 would only load the script if you register that theme in your web.config. Option 2 would load the script only if you register your custom control in your web.config.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 7/30/2012 4:31 AM
  pex
8 posts
No Ranking


Re: Usercontrol script 

 palli wrote

 Hi pex,

The options you have are:

  1. Include the script on application level. See Project's properties / Registration / Includes.
  2. Create a custom Theme and add your script as a script resource to that theme.
  3. Create a custom Control, inheriting from UserControl and add your script as a script resource to that control.

Option 2 would only load the script if you register that theme in your web.config. Option 2 would load the script only if you register your custom control in your web.config.

Hope this helps,

Palli

 

Thanks, The custom control is the way to go for me as the usercontrol is in a library

 
New Post 7/30/2012 2:18 PM
  palli
14326 posts
1st Level Poster




Re: Usercontrol script 

 Hi pex,

You are welcome and good luck.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Usercontrol script
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS