Programming with coolite in code behind file

  1. #1

    Programming with coolite in code behind file

    hi,

    here is my problem.i am using coolite but i dont want to write the codings under the script tag in the aspx page.i want to write my code in the aspx.cs page.


    but when i am using the Ext.somthing.... in the code behind file it showing an error telling that a refernce called as Ext is not existing the context.


    but when i am writing the same coding under the script tag in the aspx file as same like the examples the code works fine.


    how can i solve this problem. help me
  2. #2

    RE: Programming with coolite in code behind file

    ebineva (5/6/2010) hi,

    here is my problem.i am using coolite but i dont want to write the codings under the script tag in the aspx page.i want to write my code in the aspx.cs page.


    but when i am using the Ext.somthing.... in the code behind file it showing an error telling that a refernce called as Ext is not existing the context.


    but when i am writing the same coding under the script tag in the aspx file as same like the examples the code works fine.


    how can i solve this problem. help me
    Please post a simplified code sample demonstrating how to generate the error.


    Have you added a <ext:ScriptManager> (v0.8.x) or <ext:ResourceManager> (v1.0) to your Page?


    Geoffrey McGill
    Founder
  3. #3

    RE: Programming with coolite in code behind file

    <script runat="server">
        public static string stub = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.";
        
        protected void Option1_Click(object sender, AjaxEventArgs e)
        {
            Ext.Notification.Show(new Notification.Config
            {
                Title = "Title",
                Icon = Icon.Information,
                Html = stub
            });
        }
    </script>
    this is the code in the aspx page.

    i wanted to handle the same event from the code behind file like

    protected void Button1_Click(object sender, EventArgs e)
    {
        Ext.Notification.Show(new Notification.Config
        {
            Title = "Title",
            Icon = Icon.Information,
            Html = stub
        });
    }
    this what i tried... but the error is coming

    i added the script manager in the aspx page.

    note that i just reffered the dll , i didn't import any packages, just the default .net packages i imported.

    hope that is enough.
  4. #4

    RE: Programming with coolite in code behind file

    Do you have the required Web.config httpHander and httpModule configured?

    See section III,

    http://ext.net/download/readme.txt

    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 3
    Last Post: May 26, 2011, 7:02 AM
  2. Could not load file or assembly Coolite.Ext.Web
    By ranganath in forum 1.x Help
    Replies: 0
    Last Post: May 04, 2010, 9:11 AM
  3. [CLOSED] Question about effective TreePanel Programming
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 25, 2010, 1:32 PM
  4. Coolite Resource file not been compressed
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 16
    Last Post: Jan 29, 2009, 7:10 AM
  5. Replies: 3
    Last Post: Nov 27, 2008, 12:52 PM

Posting Permissions