This is a migrated thread and some comments may be shown as answers.

How to export Javascript in user control

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 1
Murray asked on 16 Jan 2009, 07:20 PM
I have RadGrid in user control that contains Javascript and i need to export code to external .js file. I can't figure out what i'm doing wrong.

If i have 2 user controls on page i get 2 copies of Javascript functions in main page.

1 Answer, 1 is accepted

Sort by
0
Murray
Top achievements
Rank 1
answered on 16 Jan 2009, 10:34 PM
I think i got it.

Please verify the following is correct approach in my main page:
    <telerik:RadScriptManager
        ID="asmMain" runat="server"
        EnableTheming="True"
        EnablePageMethods="True">
        <Scripts>
            <asp:ScriptReference Path="scripts/QMark.js" />
        </Scripts>
    </telerik:RadScriptManager>

I removed the script tags from usercontrol page and it now works.


Tags
Grid
Asked by
Murray
Top achievements
Rank 1
Answers by
Murray
Top achievements
Rank 1
Share this question
or