# asp code

**URL:** <https://techcommunity.softwareag.com/t/asp-code/92837>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples, Natural-on-Windows-Unix\
**Created:** [February 23, 2010, 2:46am UTC](https://techcommunity.softwareag.com/t/asp-code/92837 "2010-02-23T02:46:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabian2](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@Fabian2](https://techcommunity.softwareag.com/u/Fabian2)\
**Post date:** [February 23, 2010, 2:46am UTC](https://techcommunity.softwareag.com/t/asp-code/92837/1 "2010-02-23T02:46:23Z")

</div>

I need to know how to execute a command asp in natural to invoke a web page

---

<div class="post-metadata">

**Author:** ![Angel\_Mendoza\_O1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/angel_mendoza_o1/32/191_2.png) [@Angel\_Mendoza\_O1](https://techcommunity.softwareag.com/u/Angel_Mendoza_O1)\
**Post date:** [February 23, 2010, 3:24am UTC](https://techcommunity.softwareag.com/t/asp-code/92837/2 "2010-02-23T03:24:41Z")

</div>

Hi,

We know which will be your platform, you use NATURAL WEB INTERFACE

---

<div class="post-metadata">

**Author:** ![Angel\_Mendoza\_O1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/angel_mendoza_o1/32/191_2.png) [@Angel\_Mendoza\_O1](https://techcommunity.softwareag.com/u/Angel_Mendoza_O1)\
**Post date:** [February 23, 2010, 4:03am UTC](https://techcommunity.softwareag.com/t/asp-code/92837/3 "2010-02-23T04:03:25Z")

</div>

Hi,

If you will be using “NATURAL Web Interface” can build the page with the LINK of ASP should be in the IIS Webserver and thence by means of a button you invoke or create a javascript routine to load the HTML that invokes immediately.

Kind regards  
Angel Mendoza O

---

<div class="post-metadata">

**Author:** ![Fabian2](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@Fabian2](https://techcommunity.softwareag.com/u/Fabian2)\
**Post date:** [February 23, 2010, 10:15pm UTC](https://techcommunity.softwareag.com/t/asp-code/92837/4 "2010-02-23T22:15:19Z")

</div>

thank but I need the code for execute in a dialog of natural windows

---

<div class="post-metadata">

**Author:** ![Angel\_Mendoza\_O1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/angel_mendoza_o1/32/191_2.png) [@Angel\_Mendoza\_O1](https://techcommunity.softwareag.com/u/Angel_Mendoza_O1)\
**Post date:** [February 24, 2010, 1:06am UTC](https://techcommunity.softwareag.com/t/asp-code/92837/5 "2010-02-24T01:06:32Z")

</div>

Not elegant but it works

You must create an HTM (c:\aa.htm)

```auto

<html>
<body>
  <script>
       document.location.href='http://localhost/myAsp.asp'
  </script>
</body>
</html>
```

AND create a program NATURAL that invokes the HTM, through the command WINCMD

```auto

define data local
1 #cmd (a100)
end-define

#cmd := 'cmd /c c:\aa.htm'

call 'wincmd' #cmd

end

```

that’s all

kind regard  
Angel Mendoza O

---

<div class="post-metadata">

**Author:** ![Weihnachtsbar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/weihnachtsbar/32/146_2.png) [@Weihnachtsbar](https://techcommunity.softwareag.com/u/Weihnachtsbar)\
**Post date:** [February 25, 2010, 2:18pm UTC](https://techcommunity.softwareag.com/t/asp-code/92837/6 "2010-02-25T14:18:57Z")

</div>

:idea: You create a new dialog, and “instert ocx control” and select “Microsoft Web Browser”.

:arrow: Open from: Menu-\>Development Tools-\>Component Browser…  
You find at “All ActiveX Componets” your “Microsoft Web Browser” ocx and the interface “IWebBrowser”.

😉 There you find e.g. the Method “Navigate” where you can specify your url to the .asp page and how to code the call with Natural.

---

<div class="post-metadata">

**Author:** ![Angel\_Mendoza\_O1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/angel_mendoza_o1/32/191_2.png) [@Angel\_Mendoza\_O1](https://techcommunity.softwareag.com/u/Angel_Mendoza_O1)\
**Post date:** [February 25, 2010, 7:20pm UTC](https://techcommunity.softwareag.com/t/asp-code/92837/7 "2010-02-25T19:20:10Z")

</div>

Hi Fabian,

I think the best solution from Weihnachtsb r

---

<div class="post-metadata">

**Author:** ![Fabian2](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@Fabian2](https://techcommunity.softwareag.com/u/Fabian2)\
**Post date:** [February 26, 2010, 1:11am UTC](https://techcommunity.softwareag.com/t/asp-code/92837/8 "2010-02-26T01:11:16Z")

</div>

Thanks for the help but I need to be a code that invokes a url sending parameters. It is something like this:

[http://epjb/ida/modulodeconsulta.aspx?app=1080&doctype=1160&query=1361&param](http://epjb/ida/modulodeconsulta.aspx?app=1080&doctype=1160&query=1361&param)  
1=%&param2=%&param3=0&param4=%&param5=0&param6=01/02/2010&param7=02/02/2010

---

<div class="post-metadata">

**Author:** ![Weihnachtsbar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/weihnachtsbar/32/146_2.png) [@Weihnachtsbar](https://techcommunity.softwareag.com/u/Weihnachtsbar)\
**Post date:** [February 26, 2010, 12:40pm UTC](https://techcommunity.softwareag.com/t/asp-code/92837/9 "2010-02-26T12:40:59Z")

</div>

I don’t understand your problem.

I can see, your url contains all parameters.

Just call and initialize your new browser dialog from another dialog:  
Add an additional parameter to your browser dialog

```auto
1 #Url (A) dynamic
```

Now define a user event e.g. “URL” and let your browser ocx navigate to the specific url:

```auto
PROCESS GUI ACTION <<METHOD>> WITH #OCX-BROWSE #Url #Flags null-handle #PostData null-handle 
```

(#Flags and #Postdata are locally defines variabled of type (A) dynamic)  
open your browser dialog from another one

```auto
OPEN DIALOG "NBROWSER" NULL-HANDLE GIVING BROWSE-DIALOG 
```

and send the url

```auto
SEND EVENT "URL" TO BROWSE-DIALOG WITH AURL
```

What’s missing?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/asp-code/92837/10 "2021-04-02T14:58:05Z")

</div>


