?
Solved

How to get aspx page to work in Active Desktop

Posted on 2005-03-24
6
Medium Priority
?
286 Views
Last Modified: 2010-04-07
I created a web application in ASP.NET that reads from a text file and displays it in a text box, you are able to edit the content in the textbox and then save any changes back to the same file.  This part works.
Now what I am attemping to do is set this webpage as the active desktop.  This way I can just type into the desktop and save it.  I won't have to open any windows since I can just type into the desktop.
The problem that I am having is that I click the button to read the text file and display it, and a browser window opens.  I don't want to have a browser open since it is already on my active desktop.  Any way to fix this?  

Here is my code.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim read As String
        Dim sr As New StreamReader("C:\test\test.txt")
        TextBox1.Text = sr.ReadToEnd

        sr.Close()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim Write As String
        Dim sw As New StreamWriter("C:\test\test.txt", False)
        Write = Trim(TextBox1.Text)
        sw.WriteLine(Write)
        sw.Close()
    End Sub
0
Comment
Question by:jettman26
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:BradVrudney
ID: 13622996
This sounds like the same problem that you get with modal windows.   Try loading your page content inside an IFrame.  It should post back to itself then.
0
 

Author Comment

by:jettman26
ID: 13623354
Sorry, I am very new to any programming.  Not sure what an IFrame is or how you create one.
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 13624380
I think <frameset>...</frameset> would be much easier and better to maintain and create and of course some javascript will be involved as well...
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!

 
LVL 13

Expert Comment

by:davidlars99
ID: 13624451
by the way here is a good example of actual working page that is designed the same way

http://www.frozendev.com

of course you don't have to do all that, it can be done much easier, just tell me what is the current functionality of your page
0
 
LVL 4

Accepted Solution

by:
BradVrudney earned 2000 total points
ID: 13624624
Try this:

This is the page that you will point your desktop to:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ActiveDesktop.aspx.vb" Inherits="ActiveDesktop.ActiveDesktop"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
      <head>
            <title>ActiveDesktop</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      </head>
      <body ms_positioning="GridLayout">
            <form id="Form1" method="post" runat="server"><iframe src="ActiveDesktopIFrame.aspx" scrolling="yes" id="ActiveDesktopIFrame" name="ActiveDesktopIFrame"
                        style="MARGIN: 0px;WIDTH: 100%;HEIGHT: 100%" frameborder="no"></iframe>
            </form>
      </body>
</html>

And this is the page that will contain your actual page:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ActiveDesktopIFrame.aspx.vb" Inherits="ActiveDesktop.ActiveDesktopIFrame"%>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
      <head>
            <title>Desktop</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="CODE_LANGUAGE" content="C#">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      </head>
      <body>
            <form id="Form1" method="post" runat="server">
                  <asp:button id="Button1" runat="server" text="Load"></asp:button>
                  <asp:button id="Button2" runat="server" text="Save"></asp:button>
                  <asp:textbox id="TextBox1" runat="server"></asp:textbox>
            </form>
      </body>
</html>

0
 

Author Comment

by:jettman26
ID: 13625180
Thanks  BradVrudney and everyone else!  This worked.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

762 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