Problem to pass parameters to an URL by a store

Page 3 of 4 FirstFirst 1234 LastLast
  1. #21
    Well, you use .NET 2.0. There is no {} initialization.

    I would recommend you to upgrade to, at least, .NET 3.5.

    Here is a working on .NET 2.0 example.

    Example .NET 2.0 C#
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <%@ Import Namespace="System.Collections.Generic" %>
     
    <script runat="server">
        protected void EventStore_RefershData(object sender, StoreRefreshDataEventArgs e)
        {
            EventStore store = (EventStore)sender;
            List<Event> events = new List<Event>();
            Event ev = new Event();
            ev.EventId = 1;
            ev.Title = e.Parameters["test"];
            ev.CalendarId = 1;
            ev.StartDate = DateTime.Now;
            ev.EndDate = DateTime.Now;
            events.Add(ev);
            store.DataSource = events;
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport runat="server" Layout="fit">
                <Items>
                    <ext:CalendarPanel ID="CalendarPanel1" runat="server">
                        <EventStore
                            runat="server"
                            OnRefreshData="EventStore_RefershData"
                            IgnoreExtraFields="false">
                            <Proxy>
                                <ext:PageProxy />
                            </Proxy>
                            <BaseParams>
                                <ext:Parameter Name="test" Value="Hello World!" Mode="Value" />
                            </BaseParams>
                        </EventStore>
                    </ext:CalendarPanel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
  2. #22
    Quote Originally Posted by Daniil View Post
    Well, you use .NET 2.0. There is no {} initialization.

    I would recommend you to upgrade to, at least, .NET 3.5.

    Here is a working on .NET 2.0 example.
    sorry you'r wrong on that :Click image for larger version. 

Name:	dotnetVersion.jpg 
Views:	75 
Size:	58.4 KB 
ID:	3530 I'm on 3.5 version.
  3. #23
    Well, I see
    Version Microsoft .NET Framework :2.0.50727.3623; Version ASP.NET :2.0.50727.3618
    in the screen-shot you posted.

    I think there is the .NET 2.0 compilator.
  4. #24
    Quote Originally Posted by Daniil View Post
    Well, I see
    Version Microsoft .NET Framework :2.0.50727.3623; Version ASP.NET :2.0.50727.3618
    in the screen-shot you posted.

    I think there is the .NET 2.0 compilator.
    ????

    Your' dam right...But this is the webserver version (you see that on the HTM page it returns too the navigator) I think, and it is the webserver comming with Visual Studio as I work on debug mode...Is ther a way to change the version of .net it runs? I must confess, I did no either think to ask me the question...
  5. #25
    One day I've met the same problem in my project and didn't know why it happens. Maybe Visual Studio update.

    Never mind, bu the following thing in a web.config solved my problem:
    <system.codedom>
      <compilers>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="2">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="OptionInfer" value="true"/>
          <providerOption name="WarnAsError" value="false"/>
        </compiler>
        <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="2">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="WarnAsError" value="false"/>
        </compiler>
      </compilers>
    </system.codedom>
  6. #26
    Quote Originally Posted by Daniil View Post
    One day I've met the same problem in my project and didn't know why it happens. Maybe Visual Studio update.

    Never mind, bu the following thing in a web.config solved my problem:
    I have exactly the same for VB part, but I add the c# part, and now, your code works...Progress, progress...

    So, if I understand, the next step is to get value from the checkbox in place of the direct value passes and to adapt the things in VB right?

    But, again, how could I assign the store in th procedure in VB?
    Last edited by feanor91; Dec 01, 2011 at 9:13 AM.
  7. #27
    the next step is to get value from the checkbox in place of the direct value passes and to adapt the things in VB right?
    It looks so.
  8. #28
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void EventStore_RefershData(object sender, StoreRefreshDataEventArgs e)
        {
            EventStore store = (EventStore)sender;
            store.DataSource = new List<Event>()
            {
                new Event()
                {
                    EventId = 1,
                    Title = e.Parameters["test"],
                    CalendarId = 1,
                    StartDate = DateTime.Now,
                    EndDate = DateTime.Now
                }
            };
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <ext:Viewport ID="Viewport1" runat="server" Layout="fit">
                <Content>
                    <ext:Checkbox runat="server" ID="chkResMedParisVisible" Checked="false" LabelWidth="250" LabelAlign="Left" FieldLabel="Show ResMed Paris training possibility" >
                    </ext:Checkbox>
                    <ext:CalendarPanel ID="CalendarPanel1" runat="server">
                        <EventStore ID="EventStore1"
                            runat="server"
                            OnRefreshData="EventStore_RefershData"
                            IgnoreExtraFields="false">
                            <Proxy>
                                <ext:PageProxy />
                            </Proxy>
                            <BaseParams>
                                <ext:Parameter Name="test" Value="Hello World!" Mode="Value" />
                            </BaseParams>
                        </EventStore>
                    </ext:CalendarPanel>
                </Content>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Hum...Checkbox added, but the calendar did not show..
  9. #29
    It's already layout issue.

    Layout="fit" supports only one item.

    And there is no height of a CalendarPanel.

    Please try to set up some Height for a CalendarPanel and you will see it.

    Also please use Items instead of Content when use place any Ext.Net.Component and its inheritors there.
  10. #30
    Quote Originally Posted by Daniil View Post

    Also please use Items instead of Content when use place any Ext.Net.Component and its inheritors there.
    About that : what is the differrence between Items and Contents?

    Here the new code

    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void EventStore_RefershData(object sender, StoreRefreshDataEventArgs e)
        {
            EventStore store = (EventStore)sender;
            store.DataSource = new List<Event>()
            {
                new Event()
                {
                    EventId = 1,
                    Title = e.Parameters["test"],
                    CalendarId = 1,
                    StartDate = DateTime.Now,
                    EndDate = DateTime.Now
                }
            };
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <ext:Viewport ID="Viewport1" runat="server">
                <Items>
                    <ext:Checkbox runat="server" ID="chkResMedParisVisible" Checked="false" LabelWidth="250" LabelAlign="Left" FieldLabel="Show ResMed Paris training possibility" AutoPostBack="True">
                    </ext:Checkbox>
                    <ext:CalendarPanel ID="CalendarPanel1" runat="server">
                        <EventStore ID="EventStore1"
                            runat="server"
                            Height="500"
                            OnRefreshData="EventStore_RefershData"
                            IgnoreExtraFields="false">
                            <Proxy>
                                <ext:PageProxy />
                            </Proxy>
                            <BaseParams>
                                <ext:Parameter Name="test" Value="Hello World!" Mode="Value" />
                            </BaseParams>
                        </EventStore>
                    </ext:CalendarPanel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Removing layout and fixing calendar height to 500

    and the result :

    It is not winned for now...
    Attached Thumbnails Click image for larger version. 

Name:	Sans titre.jpg 
Views:	70 
Size:	58.2 KB 
ID:	3531  
    Last edited by feanor91; Dec 01, 2011 at 10:07 AM.
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Pass and get parameters from Window
    By AlexMaslakov in forum 1.x Help
    Replies: 1
    Last Post: Aug 19, 2011, 8:16 PM
  2. Replies: 1
    Last Post: Nov 29, 2010, 4:15 PM
  3. Listener Fn - How can I pass extra parameters?
    By lionelhutz in forum 1.x Help
    Replies: 0
    Last Post: Dec 10, 2009, 5:25 PM
  4. Replies: 2
    Last Post: Aug 10, 2009, 5:28 PM
  5. [CLOSED] Pass Parameters Using HttpProxy
    By LeeTheGreek in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 02, 2009, 12:00 PM

Posting Permissions