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

Call Sub vb from javascript

1 Answer 266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 13 Apr 2012, 05:36 PM
Hi, 
I apologize for my bad English I'll try to explain as best as possibleThis is my first ticket:you can call a vb sub from javascript written on the same page.

<script type="text/javascript"> LANGUAGE="JavaScript"

      / / Open window 
     OpenFabbricatiRadWindow function () {
         var wnd = $ find ("<= Fabbricati.ClientID%>");
         wnd.setUrl ("Form_Job / radwindow_Fabbricati.aspx");
         wnd.set_modal (true);
         wnd.show ();
     }
     / / Get selected value
     Fabbricatoselect function (senderEventArgs{
         eventArgs.get_argument var args = ();
         if (arg) {
            Varfabbricato.value = arg.Fabbricato;
            Vargestione.value = arg.Gestione;
       
   Call here ************************** **************** sub Leggi'

  }
     }

    
<script>

in the page vb.aspx

Protected Sub Leggi ()
         Dim query = From c In Archivio.Tabelle_Spesa
         In joins and Archivio.Stato On c.Tab_Stato Equals e.Id_Stato
         Select ID_Tabella c.ID_Tabella =Description = c.Tab_DescrizioneAcronym =c.Tab_Siglathousandths = c.Tab_MillesimiState = e.Stato_Descrizione
         Query = RadGrid1.DataSource
         RadGrid1.DataBind ()

     end Sub



Thank

1 Answer, 1 is accepted

Sort by
0
Fabio Cirillo
Top achievements
Rank 1
answered on 13 Apr 2012, 06:21 PM
for the time reloading the entire page with:

  Fabbricatoselect function (senderEventArgs{
         eventArgs.get_argument var args = ();
         if (arg) {
            Varfabbricato.value = arg.Fabbricato;
            Vargestione.value = arg.Gestione;

            pageId var = '<= Page.ClientID%>';
            __doPostBack (pageId);

but I would only call the sub
Tags
General Discussions
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Fabio Cirillo
Top achievements
Rank 1
Share this question
or