WebUserControls & Javascript

Discussion in '.NET' started by simonB2010, Jul 19, 2011.

  1. simonB2010

    simonB2010

    Joined:
    Jul 19, 2011
    Messages:
    1
    Likes Received:
    0
    I have created a WUC to enhance the GridView control.

    Basically, after fiddling with PageIndex, ItemCount, it calls on:
    base.InitializePager(row, columnSpan, pagedDataSource);
    ... and voila, I have my GV populated with all the data and pagebuttons i required.

    Next, I need to include some Javascript in order to sort out a fixed header/footer for the grid.
    Now I am new to the .NET world, but if does seem rather confusing and complicated on how to do this.

    I have the script here in notepad infront of me, and all I want to do is have it appear thus on the end webpage.
    The server does not need to do anything with it, or even know about it....it's basicaly just a load of text that needs to be stored in the WUC and dumped out into HTML page when the control is referenced by a form.

    I could just include the .js in the any forms created ... but it would be tidy to have it in the WUC so that it is already available whenever the control is used.

    Ooopf .. sorry for the ramble .... 2 days of .NET has left me exhausted. Some things appear delightfully easy, yet other basic actions just seem to have been made ngihtmare !

    Hope someone can help.....
    Many Thanks
    Simon
     
    simonB2010, Jul 19, 2011
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.