Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run ASP.NET application by hising the address bar

Posted on 2011-03-04
15
Medium Priority
?
809 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:Adam
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:Adam
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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:Adam
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:Adam
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:
Adam earned 500 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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