Solved

Run ASP.NET application by hising the address bar

Posted on 2011-03-04
15
788 Views
Last Modified: 2013-11-12
Hi Experts,
I am using Silverlight 4.0 using VB.NET. I am trying to hide the address bar , so that it resembles like desktop application. How to hide the address bar.

Kind regards,
Pooja
0
Comment
Question by:poojasureshkumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
15 Comments
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 35040615
Here's a way of doing it through Javascript: http://saher42.wordpress.com/2006/08/10/hiding-the-address-bar-on-pageload-using-javascript/

However, what this does is to open a new Window, with no scrollbars, address bar, toolbars etc, and close the original.

I'd recommend you don't close the original Window though - any web app I used that went and closed my browser wouldn't be use again!

0
 

Author Comment

by:poojasureshkumar
ID: 35058047
Hi Cyber-spy,
I am using Silverlight . I did what you have advised in aspx page. I am still seeing the address bar.

Kind regards,
Pooja
0
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 35058916
So, you opened a new Window (using JavaScript) in which you run your SilverLight app?

window.open(params)

The params determine what the window displays - scroll bar, address bar etc


What's the code you used to open the new Window?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:poojasureshkumar
ID: 35059011
Hi Cyber-spy,
I am using the button in ASPX page which uses silverlight plugin. Wehni click the button it opens the respective xaml pages. I hope i am clear in my question and sorry for confusing you earlier if i did it.
My task now is initially when the aspx loads it should hide addressbar.

function openWindow(){
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer")
{
    window.opener = self;
   

}
//window.open("MyVBSilverlightAppTestPage.aspx", "Details", "addressbar=no,statusbar=no");

window.open("TestPage.aspx", 'null', 'width=900,height=750,toolbar=0,scrollbars=0,location=0,resizable =1');
//window.open("TestPage.aspx", 'null', 'width=900,height=750,toolbar=no,scrollbars=no,location=no,resizable =yes');
//window.moveTo(0, 0);
//window.resizeTo(screen.width,screen.height-100);
//self.close();
}


<body>

    <form id="form1" runat="server" style="height:100%">
    <div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
              <param name="source" value="ClientBin/TestApp.xap"/>
              <param name="onError" value="onSilverlightError" />
              <param name="background" value="white" />
              <param name="minRuntimeVersion" value="4.0.50826.0" />
              <param name="autoUpgrade" value="true" />
           <param name="initParams"  value="num=1"/>
              <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
                     <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
              </a>
          </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
       
    </form>
</body>


Kind regards,
Pooja
0
 

Author Comment

by:poojasureshkumar
ID: 35070980
Hi Cyber-spy,
In App.xaml.vb showing the parent xamlpage.
 Me.RootVisual = New dectrol1(User)

Here i need to avoid the addressbar.

Kind regards,
Pooja
0
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 35074357
As the Silverlight app will run in the new Window, can you not open the window from the parent browser window using JavaScript?

Have a look at http://www.javascripter.net/faq/openinga.htm for the Window.open() function.

An example might be:
    <a href="#" onclick="window.open('your_silverlight_page.aspx','mywin','left=20,top=20,width=500,height=500,toolbar=no,location=no,resizable=no');">Open Window</a>

Open in new window


However, after some reading (and testing!) it does not seem possible to hide the URL bar (location=no) in FF and Chrome (although it seemed to work in IE8).

The reason for this is security. Think of all the fun hackers could have if they could take you to their site, while you actually thought you were on your Bank's website!
0
 

Author Comment

by:poojasureshkumar
ID: 35099915
Hi Cyber-spy,
When i use window.open, application hangs...

Kind regards,
Pooja
0
 

Author Comment

by:poojasureshkumar
ID: 35099945

Hi Cyber-spy,
In ASPX,
function openWindow(){
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer")
{
    window.opener = self;
   

}
//window.open('TestPage.aspx', 'Details', 'addressbar=0,statusbar=0');

//window.open("TestPage.aspx", 'null', 'width=900,height=750,toolbar=0,scrollbars=0,location=0,resizable =1');
//window.open("TestPage.aspx", 'null', 'width=900,height=750,toolbar=no,scrollbars=no,location=no,resizable =yes');
//window.moveTo(0, 0);
//window.resizeTo(screen.width,screen.height-100);
//self.close();
}
    </script>


XAML code
------------
Dim script As ScriptObject
 script = CType(HtmlPage.Window.GetProperty("openWindow"), ScriptObject)
script.InvokeSelf()

Kind regards,
Pooja
0
 
LVL 12

Expert Comment

by:Cyber-spy
ID: 35113564
Hi,

I'm a little confused here.

I thought you had a Silverlight Appp which you wanted to run in a new Window.
So, in the parent window, you need a link which opens a new Window, with as much decoration turned off as possible, and the page that hosts your Silverlight app.

However, you seem to be trying to use Silverlight to open the Window too.

Do you have a Silverlight app running in the parent Window as well, the window you want to close?

Regards

Adam
0
 

Author Comment

by:poojasureshkumar
ID: 35159081
Hi Adam,
Yes , the parent window also got silverlight.

Kind regards,
Pooja
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 35887115
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 12

Accepted Solution

by:
Cyber-spy earned 125 total points
ID: 35887116
I provided some good examples on how to achieve what was required, as close as possible to what can actually be achieved in aborwser.
I also pointed out that, for security reasons, a full solution was not really possible.

I believe I should get points for my answers.
0
 

Author Comment

by:poojasureshkumar
ID: 35894242
Hi Cyber-spy,
Thanks for the support that you are provided. It is not possible to hide the address bar in silverlight app and there are lot of ways a user can pick if she decided to see the addressbar in any case. So i am not ready to spend on time on this issue.

Kind regards,
Pooja
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question