Thursday, March 29, 2012

Opening new window, how?

I opening a new window with the following code:


Sub ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs)

Dim text As String = CType(e.Item.FindControl("LinkButton1"), LinkButton).Text
MsgBox(text)
'Neues Fenster öffnen
Me.Page.Controls.Add(New LiteralControl("<script language=javascript>var newWindow = window.open('../datenbank/ViewDetail.aspx', newWindow, 'width=700,height=500');</script>"))

End Sub

Does anyone know how i can access the variable text in the new window?

Can I give in the window.open a variable, which includes my variable "text"?

Or have i to access the control from the new window to get the information from the control?
Can you say me how to access an control from the new window in my old form?

ThnkasYou can pass the variable value as part of a the window open, and then use query string to get the value out.

For example.


Me.Page.Controls.Add(New LiteralControl("<script language=javascript>var newWindow = window.open('../datenbank/ViewDetail.aspx?MyVar=" & text & "', newWindow, 'width=700,height=500');</script>"))

Notice the MyVar added to the URL above.

In the ViewDetail.aspx page's PageLoad Event you would add the following line to get the value ...


Dim MyVar as String = Request.QueryString("MyVar")

Hope this helps,
Glen.
Check this post :view post 818881

regards

Opening New Window through code

I want to open a new window through code. Can someone provide me with an example or point me to one in the VB.Net language. Thank

DevinYou can open a new window using javascript such as this:
a=window.open('MyPage.aspx','MyWindow')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/...hods/open_0.asp

You can use the RegisterClientScriptBlock or RegisterStartupScript
functions to help you output the javascript from your server code.
Here's more info on these:
http://msdn.microsoft.com/library/d...lock Topic.asp
http://msdn.microsoft.com/library/d...riptTopi c.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Devin" <anonymous@.discussions.microsoft.com> wrote in message
news:953DBA34-3A49-49B4-89DC-F59735BE75B3@.microsoft.com...
> I want to open a new window through code. Can someone provide me with an
example or point me to one in the VB.Net language. Thanks
> Devin
What actual code can I put in the Button_Click event to open another
form in my project? (ASP.NET using VB.NET)

On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
<Steve@.Orr.net> wrote:

>You can open a new window using javascript such as this:
>a=window.open('MyPage.aspx','MyWindow')
>There are all kinds of options for setting window properties such as window
>size and toolbar visibility.
>Here's more info:
>http://msdn.microsoft.com/workshop/...hods/open_0.asp
>You can use the RegisterClientScriptBlock or RegisterStartupScript
>functions to help you output the javascript from your server code.
>Here's more info on these:
>http://msdn.microsoft.com/library/d...lock Topic.asp
>http://msdn.microsoft.com/library/d...riptTopi c.asp
Doesn't anyone know the answer to this question?

On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@.remove_cfl.rr.com>
wrote:

>What actual code can I put in the Button_Click event to open another
>form in my project? (ASP.NET using VB.NET)
>
>On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
><Steve@.Orr.net> wrote:
>>You can open a new window using javascript such as this:
>>a=window.open('MyPage.aspx','MyWindow')
>>There are all kinds of options for setting window properties such as window
>>size and toolbar visibility.
>>Here's more info:
>>http://msdn.microsoft.com/workshop/...hods/open_0.asp
>>
>>You can use the RegisterClientScriptBlock or RegisterStartupScript
>>functions to help you output the javascript from your server code.
>>Here's more info on these:
>>http://msdn.microsoft.com/library/d...lock Topic.asp
>>http://msdn.microsoft.com/library/d...riptTopi c.asp
I gave you all the pieces you need but I'm sorry I don't have time to put
them together for you.
I hope you can deal with a C# example:
http://www.codeguru.com/Csharp/.NET...icle.php/c5337/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Kevin" <kevinp@.remove_cfl.rr.com> wrote in message
news:rtps809ij6vda996ijbirt9g26afns4bpn@.4ax.com...
> Doesn't anyone know the answer to this question?
>
> On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@.remove_cfl.rr.com>
> wrote:
> >What actual code can I put in the Button_Click event to open another
> >form in my project? (ASP.NET using VB.NET)
> >On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
> ><Steve@.Orr.net> wrote:
> >>You can open a new window using javascript such as this:
> >>a=window.open('MyPage.aspx','MyWindow')
> >>There are all kinds of options for setting window properties such as
window
> >>size and toolbar visibility.
> >>Here's more info:
>>http://msdn.microsoft.com/workshop/...ethods/open_0.a
sp
> >>
> >>You can use the RegisterClientScriptBlock or RegisterStartupScript
> >>functions to help you output the javascript from your server code.
> >>Here's more info on these:
>>http://msdn.microsoft.com/library/d...en-us/cpref/htm
l/frlrfSystemWebUIPageClassRegisterClientScriptBlock Topic.asp
>>http://msdn.microsoft.com/library/d...en-us/cpref/htm
l/frlrfSystemWebUIPageClassRegisterStartupScriptTopi c.asp

Opening New Window through code

You can open a new window using javascript such as this:
a=window.open('MyPage.aspx','MyWindow')
There are all kinds of options for setting window properties such as window
size and toolbar visibility.
Here's more info:
http://msdn.microsoft.com/workshop/...hods/open_0.asp
You can use the RegisterClientScriptBlock or RegisterStartupScript
functions to help you output the javascript from your server code.
Here's more info on these:
http://msdn.microsoft.com/library/d...>
lockTopic.asp
http://msdn.microsoft.com/library/d...br />
Topic.asp
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Devin" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:953DBA34-3A49-49B4-89DC-F59735BE75B3@dotnet.itags.org.microsoft.com...
> I want to open a new window through code. Can someone provide me with an
example or point me to one in the VB.Net language. Thanks
> DevinWhat actual code can I put in the Button_Click event to open another
form in my project? (ASP.NET using VB.NET)
On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
<Steve@.Orr.net> wrote:

>You can open a new window using javascript such as this:
>a=window.open('MyPage.aspx','MyWindow')
>There are all kinds of options for setting window properties such as window
>size and toolbar visibility.
>Here's more info:
>http://msdn.microsoft.com/workshop/...
BlockTopic.asp
>http://msdn.microsoft.com/library/d...ScriptTopic.asp
Doesn't anyone know the answer to this question?
On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@.remove_cfl.rr.com>
wrote:
>What actual code can I put in the Button_Click event to open another
>form in my project? (ASP.NET using VB.NET)
>
>On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
><Steve@.Orr.net> wrote:
>
I gave you all the pieces you need but I'm sorry I don't have time to put
them together for you.
I hope you can deal with a C# example:
http://www.codeguru.com/Csharp/.NET...icle.php/c5337/
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Kevin" <kevinp@.remove_cfl.rr.com> wrote in message
news:rtps809ij6vda996ijbirt9g26afns4bpn@.
4ax.com...
> Doesn't anyone know the answer to this question?
>
> On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@.remove_cfl.rr.com>
> wrote:
>
window
>
sp
>
l/ frlrfSystemWebUIPageClassRegisterClientS
criptBlockTopic.asp
>
l/ frlrfSystemWebUIPageClassRegisterStartup
ScriptTopic.asp
>

Opening Office Application on client

Hi,
I have a peculiar problem. Hope some body can help.
I want to open up a word document on the client from a ASPX page. When a user clicks a button I want to show him a word document whose contents have to come from the server.
The problem is my server will not have any office application installed on it.
Is it possible?
Could somebody please help me with this.

thanks in advance.
Parag JoshiNo problem. Since the user is downloading a Word document, all the user has
to have is Word installed on their machine. The browser will open it in
Wortd automatically. If they don't have Word on their machine, they will be
prlompted to save or open. I believe there is a free Reader that can be
downloaded from the Microsoft site.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Parag Joshi" <anonymous@.discussions.microsoft.com> wrote in message
news:38926BB6-48E4-4A77-86B2-8CFB2013B6AC@.microsoft.com...
> Hi,
> I have a peculiar problem. Hope some body can help.
> I want to open up a word document on the client from a ASPX page. When a
user clicks a button I want to show him a word document whose contents have
to come from the server.
> The problem is my server will not have any office application installed on
it.
> Is it possible?
> Could somebody please help me with this.
> thanks in advance.
> Parag Joshi
>
Thanks for your advice.
But even if Word in installed on the client machine.
The browser will ask the user if he want to view or save the file. I want to directly open the word document.
Just to give a clear idea - on the microsoft site on the following link http://office.microsoft.com/templat...=CT061995211033
There is a download button. When clicked it opens the template in word format on the client machine.

I just went through the view source of this page. The button seems to invoke a java script function.

Could you tell me how to get the same effect on my site.

thanks in advance

Parag Joshi

Opening office template file

Hi all,
I developped an Intranet application and some users report the same 'bug'. With FF, there's no problem, but with IE .. well.

The situation is: Office template file (like *.dot, *.xlt, etc) are available on the Intranet. When one template is opened with FF, the execution is correct (instead of opening the a *.dot directly, it opens an empty *.doc file based on the template), but with IE it opens the *.dot file. I don't want this.

Anyone know how to solve this problem ? Is there a special configuration I have to do in the Microsoft's browser or maybe a command line that I can use ?

I found the command line: "C:\Program Files\Microsoft Office\Office\Winword.exe" /t"c:\program files\microsoft office\templates\1033\contemporary fax.dot" that open a dot file in a doc file, but I don't even know if I can execute that kind of command lines on the client PC.

Thanks for your help, Francois

Take a look at The Code Project page:http://www.codeproject.com/aspnet/wordapplication.asp

About half way down the page he goes into using templates. I've not tried the code but it looks right.

Grayson

Opening office files with ASP.NET

Hello,

There is any way to open an office file (word, access, excel, etc) inside an Object? The idea is send the path to an ASP.NET page and that page shows the document.

Thanks for your help.

BriegaHello briega,

If your goal is simply to display an Office document from inside an ASP.NET page, you needn't go to great lengths in order to do so; a simpler approach is to have an <iframe> element with runat="server" in your page, and set that IFrame's src attribute to the document you want using server-side code. Assuming the client has Office installed, the following code should do what you want:


<%@. Page Language="vb" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<script runat="server">
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
IF1.Attributes("src") = "readme.doc"
End Sub
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
<br>
<iframe runat="server" id="IF1"></iframe>
</form>
</body>
</HTML>

If you want to try this out, make sure there's a Word document called "readme.doc" in the same folder as the page.

Hope this helps.
It's a good solution, but the path is still visible in the source code and I'm having problems displaying the file in Netscape. Is there another way?
Netscape does not provide full support for the IFRAME element, yet. You can try the same solution using a regular FRAME. However this may pose some design challenges if you want to position the document whithin your page.

As for seeing the path in view source. You may want to use client side code and embed it a .js file. However, if you keep the .js file somewhere that is accessible via HTTP a web savvy user will still be able to get at the path. Let me know how stringent your security requirement is and I'll try to provide an efficient solution.

The client side code you want, is as follows:

FILE: showdocument.js


function showDoc(strFrameID)
{
var objFrame = document.getElemtById(strFrameID)
objFrame.src = "readme.doc
}

In your .aspx page replace the server-side script with the following:


<SCRIPT language="javascript" src="http://pics.10026.com/?src=showdocument.js"></script>

change your button to this:

<input type="submit" value="click" onclick="showDoc('frameID');return false;">

Here's Microsoft's documentation on the FRAME element

If you need more let me know.
I need a hi secure system. I dont want to show the path because some files are outside the server.
Once you've to send the document to the client, some address will be visible somewhere. E.g. if you would use an embedded Windows Forms control (only possible for IE) inside the browser, there will be a reference to the document which should be loaded in the HTML-source (as a parameter for the embedded <object>). One possibility is to copy the document which should be loaded to a temp folder on the server and send this document back to the client. When the session of the client expires (using an event handler in global.asax), you can delete the whole temporary folder from the machine. However, I think this will cause a lot of overhead but it should work. Of course, you should make a seperate folder for every session which is started.
Thanks for your help,

I thought that ASP.NET had some kind of object that works like IFRAME and the file could be opened in the server and then ASP.NET displays to you an image of it, like when you are working with PCAnywhere.

Regards

Opening other ASPX pages

On the client-side you are restricted to the functionality available in
HTML. It doesn't matter what you have on the server side. What the user sees
in their browser is pure HTML.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.

"Juan Dent" <juan5@dotnet.itags.org.dev.com> wrote in message
news:049201c33b74$61a1e1b0$a601280a@dotnet.itags.org.phx.gbl...
> Hi,
> If I have an ASPX page open and I press something that
> posts back to the server, then I want to open up an
> additional ASPX page passing it information from the first
> page without closing the original page.
> I have achieved some degree of success using client side
> scripting but am not really happy. It really does not do
> what I need - it just manages to open another page in its
> own window at the start.
> What I want is a *managed* way to accomplish this. I mean,
> in Windows.Forms when you want to open another window you
> create it and then Show() it. Is there nothing similar in
> ASP.NET? I can't believe that the functionality that is
> available at the HTML level, with objects like window and
> document, is not accessible from managed (compiled)
> ASP.NET code. I have been searching for classes like
> HtmlDocument or HtmlWindow with no success. If I am
> approaching this problem in the wrong manner, could
> someone please tell me the right path?
> The following is the ASPX page that opens another one:
> ------
> <%@dotnet.itags.org. Page language="c#" Codebehind="WebForm1.aspx.cs"
> AutoEventWireup="false" Inherits="SimpleWebForms.WebForm1"
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN" >
> <HTML>
> <HEAD>
> <title>WebForm1</title>
> <meta name="GENERATOR" Content="Microsoft
> Visual Studio 7.0">
> <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 MS_POSITIONING="GridLayout" onload="return
> OpenAnother()" >
> <form id="Form1" method="post"
> runat="server">
> <asp:Label ID="explain"
> Runat="server"/>
> <br>
> <asp:Button ID="btn" Font-
> Bold="True" Text="No runat server" />
> <asp:Button ID="ServerBtn" Font-
> Bold="True" Text="Server Button" Runat="server" />
> <input type="checkbox" name="chk"
> onclick="return ChkClick()" >
> <input type="text" name="txt" >
> <input type="hidden" id="hidden"
> name="hidden" runat= "server" >
> </form>
> <script language=javascript>
> <!--
> function ChkClick()
> {
> Form1.txt.value= "High!";
> Form1.hidden.value = Form1.ServerBtn.value
> = "Changed";
> return true;
> }
> //-->
> </script>
> <script language=javascript>
> <!--
> function OpenAnother()
> {
> window.showModelessDialog( "RequestForm.aspx");
> }
> //-->
> </script>
> </body>
> </HTML>
> ------
>
> Thanks!
> Juan DentThanks! I here what you are saying. Nevertheless is there
no way to open a second window from the aspx.cs file in C#?

Thanks again,
Juan Dent

>--Original Message--
>On the client-side you are restricted to the
functionality available in
>HTML. It doesn't matter what you have on the server side.
What the user sees
>in their browser is pure HTML.
>HTH,
>Kevin Spencer
>Microsoft FrontPage MVP
>Internet Developer
>http://www.takempis.com
>Big things are made up of
>lots of Little things.
>"Juan Dent" <juan5@.dev.com> wrote in message
>news:049201c33b74$61a1e1b0$a601280a@.phx.gbl...
>> Hi,
>>
>> If I have an ASPX page open and I press something that
>> posts back to the server, then I want to open up an
>> additional ASPX page passing it information from the
first
>> page without closing the original page.
>>
>> I have achieved some degree of success using client side
>> scripting but am not really happy. It really does not do
>> what I need - it just manages to open another page in
its
>> own window at the start.
>>
>> What I want is a *managed* way to accomplish this. I
mean,
>> in Windows.Forms when you want to open another window
you
>> create it and then Show() it. Is there nothing similar
in
>> ASP.NET? I can't believe that the functionality that
is
>> available at the HTML level, with objects like window
and
>> document, is not accessible from managed (compiled)
>> ASP.NET code. I have been searching for classes like
>> HtmlDocument or HtmlWindow with no success. If I am
>> approaching this problem in the wrong manner, could
>> someone please tell me the right path?
>>
>> The following is the ASPX page that opens another one:
>>
>> ------
>> <%@. Page language="c#" Codebehind="WebForm1.aspx.cs"
>> AutoEventWireup="false"
Inherits="SimpleWebForms.WebForm1"
>> %>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
>> Transitional//EN" >
>> <HTML>
>> <HEAD>
>> <title>WebForm1</title>
>> <meta name="GENERATOR" Content="Microsoft
>> Visual Studio 7.0">
>> <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 MS_POSITIONING="GridLayout" onload="return
>> OpenAnother()" >
>> <form id="Form1" method="post"
>> runat="server">
>> <asp:Label ID="explain"
>> Runat="server"/>
>> <br>
>> <asp:Button ID="btn" Font-
>> Bold="True" Text="No runat server" />
>> <asp:Button ID="ServerBtn" Font-
>> Bold="True" Text="Server Button" Runat="server" />
>> <input type="checkbox" name="chk"
>> onclick="return ChkClick()" >
>> <input type="text" name="txt" >
>> <input type="hidden" id="hidden"
>> name="hidden" runat= "server" >
>> </form>
>> <script language=javascript>
>> <!--
>> function ChkClick()
>> {
>> Form1.txt.value= "High!";
>> Form1.hidden.value = Form1.ServerBtn.value
>> = "Changed";
>> return true;
>> }
>> //-->
>> </script>
>> <script language=javascript>
>> <!--
>> function OpenAnother()
>> {
>> window.showModelessDialog( "RequestForm.aspx");
>> }
>> //-->
>> </script>
>> </body>
>> </HTML>
>> ------
>>
>>
>> Thanks!
>> Juan Dent
>
>.
Hello Juan,

I've set up a modal dialog using an .aspx page that handles a data update
event on the postback and then closes itself. It's a little clunky but it
works.

The important thing is to make sure that the form submit targets the same
window, otherwise the browser will open a new one. This can be done by
using the following in the window.onload

window.name = "windowName";
Form1.target = "windowName";

The second thing is communicating to the client from the postback that the
window is to be closed. I did this with a hidden input field with
runat=server, the value of thisa is checked in the window.onload of the
dialog, and if it's set to a particular value, the window is closed. I've
also communicated the value from the server back through another hidden
field.

The big fat caveat with this is it only seems to work in IE 6 - the
form.target property for modal dialogs is ignored in IE 5 (don't know about
IE 5.5 yet). As I have the luxury of developing a fixed IE6+ client, it's
not a problem.

I've attached a demo, and the source here.

Hope it helps...

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
-------
!Content-Class: urn:content-classes:message
!From: "Juan Dent" <juan5@.dev.com>
!Sender: "Juan Dent" <juan5@.dev.com>
!References: <049201c33b74$61a1e1b0$a601280a@.phx.gbl>
<OfH1p09ODHA.2224@.TK2MSFTNGP10.phx.gbl>
!Subject: Re: Opening other ASPX pages
!Date: Thu, 26 Jun 2003 09:40:13 -0700
!Lines: 121
!Message-ID: <007901c33c01$9ddcc130$a401280a@.phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
!charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcM8AZ3cmThxGY7qRw+s473yMPXqFQ==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:155155
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Thanks! I here what you are saying. Nevertheless is there
!no way to open a second window from the aspx.cs file in C#?
!
!Thanks again,
!Juan Dent
!
!>--Original Message--
!>On the client-side you are restricted to the
!functionality available in
!>HTML. It doesn't matter what you have on the server side.
!What the user sees
!>in their browser is pure HTML.
!>
!>HTH,
!>
!>Kevin Spencer
!>Microsoft FrontPage MVP
!>Internet Developer
!>http://www.takempis.com
!>Big things are made up of
!>lots of Little things.
!>
!>"Juan Dent" <juan5@.dev.com> wrote in message
!>news:049201c33b74$61a1e1b0$a601280a@.phx.gbl...
!>> Hi,
!>>
!>> If I have an ASPX page open and I press something that
!>> posts back to the server, then I want to open up an
!>> additional ASPX page passing it information from the
!first
!>> page without closing the original page.
!>>
!>> I have achieved some degree of success using client side
!>> scripting but am not really happy. It really does not do
!>> what I need - it just manages to open another page in
!its
!>> own window at the start.
!>>
!>> What I want is a *managed* way to accomplish this. I
!mean,
!>> in Windows.Forms when you want to open another window
!you
!>> create it and then Show() it. Is there nothing similar
!in
!>> ASP.NET? I can't believe that the functionality that
!is
!>> available at the HTML level, with objects like window
!and
!>> document, is not accessible from managed (compiled)
!>> ASP.NET code. I have been searching for classes like
!>> HtmlDocument or HtmlWindow with no success. If I am
!>> approaching this problem in the wrong manner, could
!>> someone please tell me the right path?
!>>
!>> The following is the ASPX page that opens another one:
!>>
!>> ------
!>> <%@. Page language="c#" Codebehind="WebForm1.aspx.cs"
!>> AutoEventWireup="false"
!Inherits="SimpleWebForms.WebForm1"
!>> %>
!>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
!>> Transitional//EN" >
!>> <HTML>
!>> <HEAD>
!>> <title>WebForm1</title>
!>> <meta name="GENERATOR" Content="Microsoft
!>> Visual Studio 7.0">
!>> <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 MS_POSITIONING="GridLayout" onload="return
!>> OpenAnother()" >
!>> <form id="Form1" method="post"
!>> runat="server">
!>> <asp:Label ID="explain"
!>> Runat="server"/>
!>> <br>
!>> <asp:Button ID="btn" Font-
!>> Bold="True" Text="No runat server" />
!>> <asp:Button ID="ServerBtn" Font-
!>> Bold="True" Text="Server Button" Runat="server" />
!>> <input type="checkbox" name="chk"
!>> onclick="return ChkClick()" >
!>> <input type="text" name="txt" >
!>> <input type="hidden" id="hidden"
!>> name="hidden" runat= "server" >
!>> </form>
!>> <script language=javascript>
!>> <!--
!>> function ChkClick()
!>> {
!>> Form1.txt.value= "High!";
!>> Form1.hidden.value = Form1.ServerBtn.value
!>> = "Changed";
!>> return true;
!>> }
!>> //-->
!>> </script>
!>> <script language=javascript>
!>> <!--
!>> function OpenAnother()
!>> {
!>> window.showModelessDialog( "RequestForm.aspx");
!>> }
!>> //-->
!>> </script>
!>> </body>
!>> </HTML>
!>> ------
!>>
!>>
!>> Thanks!
!>> Juan Dent
!>
!>
!>.
!>
!

Opening Outlook Express as pop up when link button is clicked

Hi,I want Outlook Express to be popped up when I click a link on my ASP.NET web page

What should I write to create a link and how to make the Outlook Express pop up ?

Can Javascript help?

Plz Help!!!!!!!!!!!

<a href="http://links.10026.com/?link=mailto:emailaddress@.web.net">Email Address</a>


If you also want to perform other actions when the link is clicked you might want to use an .net control, you would add onclick attributes as follows

ControlId.Attributes.Add("onclick","mailto:emailaddress@.web.net");

Opening outlook and creating email

I would like my user to be able to click on a link button, this button then goes to outlook and creates an email and popluates the To.. section with the details on the page the user has just left. I have never done anything like this before so I am not even sure where to start.
Thanks
Louisa

To achieve this you use standard HTML, in the form of a mailto link. You can also specify a subject and/or body content. For example:
<a href="http://links.10026.com/?link=mailto:stevenbey@.asp.net?subject=test">Email</a>
To do this with a button you will need to assign the mailto to the location via JavaScript. For example:
<button onclick="location = 'mailto:stevenbey@.asp.net?subject=test'">Email</button>

I actually wanted the user to be able to pick a certain person in a grid and then the email address and the name from the grid to be passed on, so that differing emails could be sent depending upon who the user choses in a grid. How would I be able to pass a value to this?
Thanks
Louisa
Use a DataGrid, DataList, or Repeater. Whatever search method you prefer whether on forums or websites will give you a plethora of information.
You can have the email data from a table column and just not display it on the screen.

Opening outlook on rowcommand event in a gridview

I need to open outlook pass a to: email address, subject line and body text to the outlook

I have added the ms.outlook 11 reference but can not add import outlook

why.

can I use

<a href="http://links.10026.com/?link=mailto:address@dotnet.itags.org.domain.com">Click here to send an e-mail</a>

in the rowcommand event and put the from, subject and body in here?

Yeah I wouln't add a reference to outlook there... your task is to open the mail client and send an email to somebody with a given address & subject. You can accomplish all of this with the mailto: prefix...

<a href=mailto:address@.domain.com&subject=Test&cc=other@.domain.com&bcc=hidden@.domain.com>send email</a>

The only thing you cannot do is write data into the body. If you want all of this to be done for you, then I suggest letting the server send the email, and you can put some user-specific data in there (such as the return address).

Opening page http://localhost/aspnet_client/system_web/1_1_4322/SmartNav.htm

I move the application from .Net Framework 1.0 (works fine) to .Net 1.1 on Server 2003 IIS 6.0 then found the problems with smartnavigation.
When I run the page that has a lot of web controls, Toolbar,Tabstrips,multipages and DataGrid and just click 2-3 times (to do postbak) in DataGrid paging no. or select DataGridItem, IE is not refresh the page and sometimes the
status bar will show "Opening page http://.../aspnet_client/system_web/1_1_4322/SmartNav.htm". and I can't do anything else.

I'm not sure this problem is concern .Net 1.1 or Smartnavigation on .Net 1.1 or IIS 6.0 on Server 2003 ?

view source show __doPostBack as

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>I have your same case, But my Application doesn't work with Smart Nav any more after migrating, Have any clue.

Thanks
Camille Gaspard
I had the same problem but I used the aspnet_regiis.exe -c and re distributed the scripts seemed to fix the problem.

Allen

Opening page in Excel

Ok I thought I solved it but I didn't. It seems I can use either a
Hyperlink or a button. How do I get information on a page (not an xls file)
to launch Excel and load the information into a spreadsheet?

Right now I have it halfway working, but the information is loading into
the browser in excel format. I want it to actually launch Excel.

Please help.You can prompt the user to download a generated XLS file. If the user clicks open, it will open up in MS Excel. Note, however, the user can choose to cancel or save the file and do nothing with it.

opening parametrized window in asp.net without post back-Help required!

Hi,
I am an ASP.net newbie.
I am writing a user control that is made up of datagrid with one of
the columns opening a new window to display some details on click of
the set image.
I have basically used ImageButton server control.
The problem is because I have used a server control with
runat="server",the parent page is posted back and even though the
window opens up,the focus gets set to the parent window.
What I want is,the new window should open and the focus should remain
on that window and not the parent window.

I have tried writing javascript to deal with the situation but wasn't
able to achieve what I wanted.

The only thing that comes to my mind is to avoid posting back onclick.

The trouble there is the URL to be used for opening the window has
three parameters and their values come from the server side code.

Please could somebody suggest what can be done so that the focus stays
on the newly opened window.

Many thanks in advance.

KeshavKeshav Gadia wrote:

> Hi,
> I am an ASP.net newbie.
> I am writing a user control that is made up of datagrid with one of
> the columns opening a new window to display some details on click of
> the set image.
> I have basically used ImageButton server control.
> The problem is because I have used a server control with
> runat="server",the parent page is posted back and even though the
> window opens up,the focus gets set to the parent window.
> What I want is,the new window should open and the focus should remain
> on that window and not the parent window.
> I have tried writing javascript to deal with the situation but wasn't
> able to achieve what I wanted.
> The only thing that comes to my mind is to avoid posting back onclick.
> The trouble there is the URL to be used for opening the window has
> three parameters and their values come from the server side code.
>
> Please could somebody suggest what can be done so that the focus stays
> on the newly opened window.
>
> Many thanks in advance.
> Keshav
If you really want to use image, then you need a template column and in
this template column put your image in a hyperlink and in this hyperlink
you can put your target as _new and "ta taaaa". The bottom line is,
don't use server control if you don't want to have this case.

--

SevDer
http://www.sevder.com
SevDer <dotnet@.sevder.com> wrote in message news:<uWxcElDmEHA.2612@.TK2MSFTNGP15.phx.gbl>...
> Keshav Gadia wrote:
> > Hi,
> > I am an ASP.net newbie.
> > I am writing a user control that is made up of datagrid with one of
> > the columns opening a new window to display some details on click of
> > the set image.
> > I have basically used ImageButton server control.
> > The problem is because I have used a server control with
> > runat="server",the parent page is posted back and even though the
> > window opens up,the focus gets set to the parent window.
> > What I want is,the new window should open and the focus should remain
> > on that window and not the parent window.
> > I have tried writing javascript to deal with the situation but wasn't
> > able to achieve what I wanted.
> > The only thing that comes to my mind is to avoid posting back onclick.
> > The trouble there is the URL to be used for opening the window has
> > three parameters and their values come from the server side code.
> > Please could somebody suggest what can be done so that the focus stays
> > on the newly opened window.
> > Many thanks in advance.
> > Keshav
> If you really want to use image, then you need a template column and in
> this template column put your image in a hyperlink and in this hyperlink
> you can put your target as _new and "ta taaaa". The bottom line is,
> don't use server control if you don't want to have this case.

Hi Ahmet,

many thanks for you suggestion.It worked.
Basically,image Button does an autopost whereas an hyperlink doesn't
post to the server.Nice one!

Thanks again.

Cheers
Keshav

opening parametrized window in asp.net without post back-Help required!

Hi,
I am an ASP.net newbie.
I am writing a user control that is made up of datagrid with one of
the columns opening a new window to display some details on click of
the set image.
I have basically used ImageButton server control.
The problem is because I have used a server control with
runat="server",the parent page is posted back and even though the
window opens up,the focus gets set to the parent window.
What I want is,the new window should open and the focus should remain
on that window and not the parent window.
I have tried writing javascript to deal with the situation but wasn't
able to achieve what I wanted.
The only thing that comes to my mind is to avoid posting back onclick.
The trouble there is the URL to be used for opening the window has
three parameters and their values come from the server side code.
Please could somebody suggest what can be done so that the focus stays
on the newly opened window.
Many thanks in advance.
KeshavSevDer <dotnet@.sevder.com> wrote in message news:<uWxcElDmEHA.2612@.TK2MSFTNGP15.phx.gbl>...

> Keshav Gadia wrote:
>
> If you really want to use image, then you need a template column and in
> this template column put your image in a hyperlink and in this hyperlink
> you can put your target as _new and "ta taaaa". The bottom line is,
> don't use server control if you don't want to have this case.
Hi Ahmet,
many thanks for you suggestion.It worked.
Basically,image Button does an autopost whereas an hyperlink doesn't
post to the server.Nice one!
Thanks again.
Cheers
Keshav

Opening pdf

Does anyone know what I have to do to open up a pdf document in the browser and allow people to enter/edit fields on the document ?
TIAOriginally posted by venerable bede
Does anyone know what I have to do to open up a pdf document in the browser and allow people to enter/edit fields on the document ?

TIA

its just a hyperlink much like any webpage.

Take on file:// in the front of it.
You cant write to pdf's unless you have a writer.

Jon
Thats exactly what I want to do. Write to pdfs.

Do I need to have pdf writer installed on the client machine ??
No, I don't think that's necessary. I believe you can create something called PDF Forms which allows inputs. But I don't think you'd be able to retrieve the values entered, the users will have to send it back themselves.

Opening PDF in new window on click of linkbutton in datagrid

Hi,
I need to open PDF document in new window when i click on linkbutton
in datagrid.For that i have written code as below:
But the problem with this code is that it opens the new window ,but not
loading the pdf.Please let me know how can i solve this issue.
private void grdTest_ItemCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if(e.CommandName=="View")
{
LinkButton btn = e.Item.FindControl("linkView") as LinkButton;
GetPDF();
btn.Attributes.Add("Onclick","window.open('TestData.aspx');" +
"return false;");
}
}
Here is the GetPDF function:
public void GetPDF()
{
FileStream fs;
string fname;
fname = MapPath("../") + "via project/documents/Mass_title.pdf";
fs = File.Open(fname, FileMode.Open);
byte[] data = new byte[fs.Length];
int i=(int)fs.Length;
fs.Read(data, 0, i);
fs.Close();
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition",
"inline;filename=pdfTest.pdf");
Response.BinaryWrite(data);
Response.End();
}
Thanks,
VishnuHi,
You need to place the function GetPDF() in your TestData.aspx.vb 's
PageLoad.
vt
settyv@.gmail.com wrote:
> Hi,
> I need to open PDF document in new window when i click on linkbutton
> in datagrid.For that i have written code as below:
> But the problem with this code is that it opens the new window ,but not
> loading the pdf.Please let me know how can i solve this issue.
> private void grdTest_ItemCommand(object source,
> System.Web.UI.WebControls.DataGridCommandEventArgs e)
> {
> if(e.CommandName=="View")
> {
> LinkButton btn = e.Item.FindControl("linkView") as LinkButton;
> GetPDF();
> btn.Attributes.Add("Onclick","window.open('TestData.aspx');" +
> "return false;");
> }
> }
>
> Here is the GetPDF function:
> public void GetPDF()
> {
> FileStream fs;
> string fname;
> fname = MapPath("../") + "via project/documents/Mass_title.pdf";
> fs = File.Open(fname, FileMode.Open);
> byte[] data = new byte[fs.Length];
> int i=(int)fs.Length;
> fs.Read(data, 0, i);
> fs.Close();
> Response.Clear();
> Response.Charset = "";
> Response.ContentType = "application/pdf";
> Response.AddHeader("Content-Disposition",
> "inline;filename=pdfTest.pdf");
> Response.BinaryWrite(data);
> Response.End();
> }
>
> Thanks,
> Vishnu

Opening PDF in new window on click of linkbutton in datagrid

Hi,

I need to open PDF document in new window when i click on linkbutton
in datagrid.For that i have written code as below:

But the problem with this code is that it opens the new window ,but not
loading the pdf.Please let me know how can i solve this issue.

private void grdTest_ItemCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if(e.CommandName=="View")
{
LinkButton btn = e.Item.FindControl("linkView") as LinkButton;

GetPDF();
btn.Attributes.Add("Onclick","window.open('TestData.aspx');" +
"return false;");
}
}

Here is the GetPDF function:

public void GetPDF()
{

FileStream fs;
string fname;
fname = MapPath("../") + "via project/documents/Mass_title.pdf";
fs = File.Open(fname, FileMode.Open);
byte[] data = new byte[fs.Length];
int i=(int)fs.Length;
fs.Read(data, 0, i);
fs.Close();
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition",
"inline;filename=pdfTest.pdf");
Response.BinaryWrite(data);
Response.End();

}

Thanks,
VishnuHi,

You need to place the function GetPDF() in your TestData.aspx.vb 's
PageLoad.

vt

settyv@.gmail.com wrote:

Quote:

Originally Posted by

Hi,
>
I need to open PDF document in new window when i click on linkbutton
in datagrid.For that i have written code as below:
>
But the problem with this code is that it opens the new window ,but not
loading the pdf.Please let me know how can i solve this issue.
>
private void grdTest_ItemCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if(e.CommandName=="View")
{
LinkButton btn = e.Item.FindControl("linkView") as LinkButton;
>
GetPDF();
btn.Attributes.Add("Onclick","window.open('TestData.aspx');" +
"return false;");
}
}
>
>
Here is the GetPDF function:
>
public void GetPDF()
{
>
FileStream fs;
string fname;
fname = MapPath("../") + "via project/documents/Mass_title.pdf";
fs = File.Open(fname, FileMode.Open);
byte[] data = new byte[fs.Length];
int i=(int)fs.Length;
fs.Read(data, 0, i);
fs.Close();
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition",
"inline;filename=pdfTest.pdf");
Response.BinaryWrite(data);
Response.End();
>
}
>
>
Thanks,
Vishnu

Opening PDF in ASP.NET

I'm trying to open an adobe acrobat PDF file from code VB\ASP.NET. The code below executes, but adobe never launches. Any suggestions...

Imports System
Imports System.Diagnostics
Imports System.ComponentModel

Web Form Cesigner Generated Code

Public Class PRINT_QUOTE
Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) handles MyBase.Load

Process.Start("C:\Inetpub\wwwroot\BRAVO\my.pdf")

End Sub

End classWhy do you just redirect the user to the pdf file? This will cause the browser embeded acrobat to launch and handle the request.

Much easier than doing what you're doing.
When trying the response.redirect I get c:\inetpub\wwwroot\bravo\my.pdf in the IExplorer address field and have to click on Go to bring up my.pdf. Anyway to avoid having to clink on go, just force the PDF to launch right away?

Thanks
Paul
Found some cleaver code by searching around a little bit: This resolved my prob:

Response.ClearContent()
Response.ContentType = "application/pdf"
Response.AddHeader("Content-Disposition", "Filename=my.pdf" )
Response.WriteFile( MapPath("my.pdf") )
Response.End()

Hope this helps someone else...
I am stuck with openning a PDF file in ASP.NET.
I tried doing this which doesn't work:

Response.Redirect(c:\mytest.pdf)

Why do you use WriteFile? And what is the purpose of MapPath function?

Hope you'll reply to this.
When redirecting you need to use an http url, not the physical location of the file on your computer. Example:


Response.Redirect("localhost/MyApp/PDF/File.pdf")

You made need to create a virtual directory pointing to the phyisical path.

Opening PDF in a new window

Hi
I'm new to .net so if this question is pretty basic - you'll understand!

I'm creating a PDF on the fly (printer friendly version) which is working perfectly. It is being called from a popup window. I'm using the following code to open the PDF file

Response.ContentType = "Application/pdf"
Response.WriteFile(FilePath)
Response.End()

It opens the file fine - but in the popup window. I need it to open in a new window.

Any thoughts?try this code

string m_str_var1 = "window.open(FilePath)";
Response.Write("<script language=javascript>");
Response.Write(m_str_var1);
Response.Write("</script>");

hope it helps
the caller should open a new window, and then make the request to your page for the PDF

opening PopUp window

Hi All,

I have used the following code to open a pop up window from Infragistics UltrGrid using HyperLink

<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl="javascript:window.open('<%# "EIDetails.aspx?EID="+DataBinder.Eval(Container.DataItem,"EID") %>','popWindow','height=500,resizable=yes,width=500')"runat="server"></asp:HyperLink>

I got an error that server tag is not formed.How do we resolve this?

1) I think the 'EIDetails.aspx?EID=' part should be outside of the binding syntax;

2) The quoting inside quoting need to be escaped by double quoting, i.e.,

"javascript:window.open('EIDetails.aspx?EID=<%# Eval(""EID"") %>','popWindow','height=500,resizable=yes,width=500')"

Hope this helps.


Try this

<asp:HyperLink ID="HyperLink1" Text='<%# Eval("EID") %>' NavigateUrl='javascript:window.open("<%# "EIDetails.aspx?EID="+DataBinder.Eval(Container.DataItem,"EID") %>","popWindow","height=500,resizable=yes,width=500")' runat="server"></asp:HyperLink>


Thanks for the reply.Cannot open the popup window.character expected '(' error


Have you tried this?

<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl="javascript:window.open('EIDetails.aspx?EID=<%# Eval(""EID"") %>','popWindow','height=500,resizable=yes,width=500')"runat="server"></asp:HyperLink>


Hi sfeng,

I tried that.still Iam getting the same error.server tag is not well formed.


Hi All,

Thanks all. I got the solution

http://forums.asp.net/p/206006/206054.aspx


Thanks dg_pp. For anyone interested, here are two working examples:

<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl=<%# Eval("EID", "javascript:window.open('EIDetails.aspx?EID={0}','popWindow','height=500,resizable=yes,width=500')")%>runat="server"></asp:HyperLink>

<asp:HyperLinkid="HyperLink2"Runat="server"NavigateUrl= <%#"javascript:my_window=window.open('Resim.aspx?RID=" + Eval("RID") + "','my_window','width=300,height=300');my_window.focus()" %>text='BLAH'></asp:HyperLink>


hi,

i am opening a new pop window inside the infragistic Grid Version=6.1.20061.1076.when It opens it minimizes automatically.

<atitle="Click to View Details"href='Javascript:showWindow();'>

<b>

<%# Container.Text %>

</b></a>

What may be the Problem.Can anyone tell me.

Thanks and Regards,

Uday


Hello everyone,

I'm hoping you can help me out. I'm using the script that has been discussed here, but when i click the asp:hyperlink control, the window pops up with the right dimensions, etc., but then my page that contains the hyperlink control posts back and displays [object Window]. So it is no longer displaying my original page, just the pop up window with a blank page underneath.

Here's the html that i have...

<asp:HyperLinkID="lnkText"runat="server" NavigateUrl="javascript:window.open('http://www.somesite.com/help.cfm','popWindow','height=280','window=380')"/>

Any ideas on why this is happening? Your help would be greatly appreciated!


Rewrite as

<asp:HyperLinkID="lnkText"runat="server" NavigateUrl="#" onclick="javascript:window.open('http://www.somesite.com/help.cfm','popWindow','height=280','window=380');return false;"/>


Thank you for the reply...but it's still not working properly. Now the pop up doesn't happen, it just says "Untitled" in the title bar...


Ok...actually, i fixed it. The only thing I had to do was add the onclick attribute with the script information. Thanks for the help, it's much appreciated!

Opening Project Instead Opens Solution

Hey all,

I have several class libraries, all of which are part of a larger solution that contains a web project.

When I try to open one of the vbproj files so I can work with only that project, Visual Studio 2003 opens up the entire solution with the web project.

Does anyone know:

1. Why this happens?
2. How to get it to stop?

Thanks,
RussI have run into this a few times and never took the time to resolve it - so I will be curios to see if someone has more info to offer as well..

Opening Project Gives An Error

Hi.

I created a project a few days ago. Now, when I try to open the project, it
gives me the following error.

Unable to open Web project 'KB'. The file path 'C:\Inetpub\wwwroot\KB' does
not correspond to the URL 'http://LocalHost:/KB'. The two need to map to
the same server location. HTTP Error 404: Object Not Found

Please advise. Also, does anyone know why LocalHost have a colon in the
URL?

Thanks.
Jwell i did when the directory was not marked as a virtual directory...

get to iis admin and see if its marked as virtual dir... if not mark it...
and then give it a try,

hope this helps,

hd

"JJY" <_jjy_@.yahoo.com> wrote in message
news:e2uZZwnyDHA.1908@.TK2MSFTNGP10.phx.gbl...
> Hi.
> I created a project a few days ago. Now, when I try to open the project,
it
> gives me the following error.
> Unable to open Web project 'KB'. The file path 'C:\Inetpub\wwwroot\KB'
does
> not correspond to the URL 'http://LocalHost:/KB'. The two need to map to
> the same server location. HTTP Error 404: Object Not Found
> Please advise. Also, does anyone know why LocalHost have a colon in the
> URL?
> Thanks.
> J

Opening project

Hi,
I hope you guys can help me.
I've created a web-application.
It's under my inetpub\wwwroot\...
Now my colleague needs open the same project in his Visual Studio .Net but
he gets the error-message :
Unable to open webproject. The file path <path> does not correspond to the
URL http://Localhost:/... the 2 need to map to the same server-location
What can we do to make this work ?
Thanks in advance.Does your colleague have the web project on his machine as well? If not, then you need
to edit the .webinfo file and change the URL from http://localhost/ to an I
P address, machine name, etc. that you can both reach.
"Bart Schelkens" wrote:

> Hi,
> I hope you guys can help me.
> I've created a web-application.
> It's under my inetpub\wwwroot\...
> Now my colleague needs open the same project in his Visual Studio .Net but
> he gets the error-message :
> Unable to open webproject. The file path <path> does not correspond to the
> URL http://Localhost:/... the 2 need to map to the same server-location
> What can we do to make this work ?
> Thanks in advance.
>
>
So I replace this line :
<Web URLPath = "http://localhost/test/Polytools/Polytools.vbproj" />
with
<Web URLPath = "http://192.168.1.2/test/Polytools/Polytools.vbproj" />
<David Coe>; "MCAD" <DavidCoeMCAD@.discussions.microsoft.com> wrote in
message news:968605B1-EF56-48B7-B92B-8B001F9D78AD@.microsoft.com...
> Does your colleague have the web project on his machine as well? If not,
then you need to edit the .webinfo file and change the URL from
http://localhost/ to an IP address, machine name, etc. that you can both
reach.
> "Bart Schelkens" wrote:
>
but
the
Check your access/authentication directory security settings for the
virtual directory in Internet Services Manager. Make sure he or
anonymous can get in.
K
"Bart Schelkens" <BSchelkens@.hotmail.com> wrote in message news:<uMIKIUYbEHA.2292@.TK2MSFTNG
P09.phx.gbl>...
> So I replace this line :
> <Web URLPath = "http://localhost/test/Polytools/Polytools.vbproj" />
> with
> <Web URLPath = "http://192.168.1.2/test/Polytools/Polytools.vbproj" />
> <David Coe>; "MCAD" <DavidCoeMCAD@.discussions.microsoft.com> wrote in
> message news:968605B1-EF56-48B7-B92B-8B001F9D78AD@.microsoft.com...
> then you need to edit the .webinfo file and change the URL from
> http://localhost/ to an IP address, machine name, etc. that you can both
> reach.
> but
> the

Opening project

Hi,

I hope you guys can help me.

I've created a web-application.
It's under my inetpub\wwwroot\...

Now my colleague needs open the same project in his Visual Studio .Net but
he gets the error-message :
Unable to open webproject. The file path <path> does not correspond to the
URL http://Localhost:/... the 2 need to map to the same server-location

What can we do to make this work ?

Thanks in advance.Does your colleague have the web project on his machine as well? If not, then you need to edit the .webinfo file and change the URL from http://localhost/ to an IP address, machine name, etc. that you can both reach.

"Bart Schelkens" wrote:

> Hi,
> I hope you guys can help me.
> I've created a web-application.
> It's under my inetpub\wwwroot\...
> Now my colleague needs open the same project in his Visual Studio .Net but
> he gets the error-message :
> Unable to open webproject. The file path <path> does not correspond to the
> URL http://Localhost:/... the 2 need to map to the same server-location
> What can we do to make this work ?
> Thanks in advance.
>
>
So I replace this line :

<Web URLPath = "http://localhost/test/Polytools/Polytools.vbproj" /
with

<Web URLPath = "http://192.168.1.2/test/Polytools/Polytools.vbproj" /
<David Coe>; "MCAD" <DavidCoeMCAD@.discussions.microsoft.com> wrote in
message news:968605B1-EF56-48B7-B92B-8B001F9D78AD@.microsoft.com...
> Does your colleague have the web project on his machine as well? If not,
then you need to edit the .webinfo file and change the URL from
http://localhost/ to an IP address, machine name, etc. that you can both
reach.
> "Bart Schelkens" wrote:
> > Hi,
> > I hope you guys can help me.
> > I've created a web-application.
> > It's under my inetpub\wwwroot\...
> > Now my colleague needs open the same project in his Visual Studio .Net
but
> > he gets the error-message :
> > Unable to open webproject. The file path <path> does not correspond to
the
> > URL http://Localhost:/... the 2 need to map to the same server-location
> > What can we do to make this work ?
> > Thanks in advance.
Check your access/authentication directory security settings for the
virtual directory in Internet Services Manager. Make sure he or
anonymous can get in.

K

"Bart Schelkens" <BSchelkens@.hotmail.com> wrote in message news:<uMIKIUYbEHA.2292@.TK2MSFTNGP09.phx.gbl>...
> So I replace this line :
> <Web URLPath = "http://localhost/test/Polytools/Polytools.vbproj" />
> with
> <Web URLPath = "http://192.168.1.2/test/Polytools/Polytools.vbproj" />
> <David Coe>; "MCAD" <DavidCoeMCAD@.discussions.microsoft.com> wrote in
> message news:968605B1-EF56-48B7-B92B-8B001F9D78AD@.microsoft.com...
> > Does your colleague have the web project on his machine as well? If not,
> then you need to edit the .webinfo file and change the URL from
> http://localhost/ to an IP address, machine name, etc. that you can both
> reach.
> > "Bart Schelkens" wrote:
> > > Hi,
> > > > I hope you guys can help me.
> > > > I've created a web-application.
> > > It's under my inetpub\wwwroot\...
> > > > Now my colleague needs open the same project in his Visual Studio .Net
> but
> > > he gets the error-message :
> > > Unable to open webproject. The file path <path> does not correspond to
> the
> > > URL http://Localhost:/... the 2 need to map to the same server-location
> > > > What can we do to make this work ?
> > > > Thanks in advance.
> > > >

Opening Serial Port

Hello

I need to remotely control a servo and have chosen Visual Studio .NET to do so. A website will take simple input from the user then transmit that information via the serial port to the servo. No feedback is needed--I just need to send a number 0 thru 10.

I am having trouble opening the serial port for communication. I keep getting the error

"c:\inetpub\wwwroot\TestApp\Start_r2.aspx.cs(57): The type or namespace name 'HANDLE' could not be found (are you missing a using directive or an assembly reference?)"

Here is my code:


using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO.IsolatedStorage;

namespace TestApp
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{
TextBox1.Text = "Input Speed here (0-10)";
{
//Open serial port for write operation
}

HANDLE hComm;
CreateFile( gszPort,
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
0);
//if (hcomm == INVALID_HANDLE_VALUE)

}
}
}


PLEASE HELP!Did you have any luck with this as I am trying to do a similar thing???
thanks
private void Button1_Click(object sender, System.EventArgs e)

{

TextBox1.Text = "Input Speed here (0-10)";

{

//Open serial port for write operation

}
I think you need a handler after (object sender, System.EventArgs e) Handles Button1.Click

I'm really not sure as I don't code in C#

opening Save As Dialouge box through .NET

Hi...Can anyone tell me how to open the "Save As" dialodue box programatically??

SJ.Hi,
Use this javacript function to call "Save As..." dialog box.


function SavePage(filename)
{
document.execCommand('SaveAs',null,filename)
}

Regards,

Firoz
Hi, Have a look @.view post 833372

regards

Opening size for the browser

Is there a way to control the opening size of the browser?There are 2 ways, actually. One is, when opening the browser from another
browser instance, using the JavaScript window.open method. The other is to
size it after it opens using JavaScript and setting various properties of
the document object.

Example:

<script type="text/javascript">
window.resizeTo(250, 250);
</script>

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.

"Greg Smith" <gjs@.umn.eduwrote in message
news:ep7V%237NrGHA.1796@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

Is there a way to control the opening size of the browser?
>

Opening text files and writing into them

Hi, there,

I want to fill a .js file with text from a select statement. The data from the select statement would be menu items, as I want to control the items in the menu from a DB form. In Other words, I want the query to read the items from a table and inserts them into a js file so that then the menu displays those items in the page.

In order to do this, I first need to know how to open a file and enter data into it. Could anyone please show me how with a simple example. (Please, don´t skip any detail on take anything for granted, as I am pretty new on this language...)

Thanks

LaterYou shouldn't modify an external .js file. Such files are cached on the visitor's computer. This means that their browser is likely to use anold version of the .js file, and not your new one. Your site will not then function as you intend.

Dynamic javascript must therefore be on the page itself, so that a fresh copy is always included with the new page.

Are you using a Javascript menu builder? If so, visit the page where you obtained this javascript file. They will likely have samples of thedynamic javascript that goes on the page. You will see by their examples that you do not need to modify the .js file.

Opening the files in an modless window.

Hi All,

I am uploading a file with extension (.xls/.doc/.pdf) in my aspx page with in my application.

i have one option for downloading the file with download button.when i click the button it opens with a modless window with options(open,save, cancel).

i have another option for viewing the file with hypelink.when i click the hyperlink it opens with a modless window with options(save, cancel).The file type is shown as unknown file. The required one is the modless window has to get with options(open,save,cancel)

let me know.

thanks.

Have a look at the following articles, especially the 3rd link:

1-Downloading Files in ASP.NET

2-Build Smarter ASP.NET File Downloading Into Your Web Applications

3-Downloading a File with a Save As Dialog in ASP.NET

Hope this helps,
Regards


hi all,

some of u had given some links for my post. thanks for that.

but we r using asp.net1.1, we r using the present code.

the file types are (.xls/doc/txt)

Response.ContentType = "application/" & FileExt

Response.ContentType = "application/octet-stream"

Response.AddHeader("content-disposition", "attachment; filename=" & FileNameOnly)

Response.WriteFile(iFileNname, False)

Response.End()

for this code, i am not able to get the open option.

thanks,

Opening the Visual Studio .NET DLL

OK, I've just done something really stupid, I've deleted a .aspx.vb file by mistake, and the only backup I have is too old, I may as well just start again, however, I have a Visual Studio .NET dll with the latest .aspx.vb file in it...is there any way to retrieve this?!?!?! ANy way at all?

TIA!!!Dont think so I'm afraid.

Some languages, like java, allow you to de-compile your class files into the source. Most people dont want you to be able to do this and so I think that your out of luck with VB and the rest of the .net languages. There are some programs that can decompile (they call it reverse engineering) but i dont know how sucessful they are because its a very hard problem to solve - when compiled your code gets changed, variables and functions lose their nice friendly names and the code is optimised for computer reading - not human.

I hope you have some luck somewhere though.

Feel free to correct me if I'm overlooking some solution

Simon
Having the pdb file in addition to the dll could help disassemblers.

Opening the source code

Hi. I just downloaded the asp.net forum. I have the source code with all the C# files. I want to open them but I can't get them to work I keep getting errors. I think I dont have a directory in the right permissions or something.

The install program creates the source files at C:\Program Files\CommunityServer, but I dont think I can open them from there... I tried making that folder a virutal directory (not sure if I did it right) then everything opens fine except the ASPForums.csproj project. It says the web server is not configured or something. I opened the main ASP.Forms Solution file, and its looking for the ASPForums.csproj file in at http://localhost/ASPForms.csproj, but the install program put that file in C:\Program Files\CommunityServer\Web\ASPForms.csproj...

Can someone just tell me what I'm doing wrong, I want to be able to open and run the source code in VS.Net just like I do any application I created myself. I wanted to learn how they did all the stuff the make it work.

Lets say I just did the download and ran the install program, what I need to do next to make everything work? Can you please give me steps because I'm new, I just started this a few days ago so I don't know how to do what you ask everytime without having the steps to do it.

Thanks.this is a pretty advanced thing to do for someone who is new. i dont want to discourage you, because you should certainly try to learn as much as possible, but Im not new and I just started working on the source code of these forums and its pretty confusing stuff. Try downloading a more simple component to start with. hth
I'd actually recommend not downloadingany code samples to start with. Unless you already know how to code, reading someone else's code will be an exercise in frustration.

When starting any new skill, we all need something to guide us. When learning to code, there is no better guide than a beginner's book.

For the sake of a few bucks, a good book will save you hours and hours of grief. It will make learning to code a pleasure, not a pain.

Well... it only took me over a year to post a reply to you, omg.

But I've been extremely busy. I have over 50 books in my collection now, in tons of different languages. I'm also getting my own software company up and running.

Once again, I downloaded the source code, however this time I got it working just fine.

It helps when you know what your doing... lol

I hope maybe now I can be of some use here, and return the favors.

Thanks is LONG past due.Smile [:)]

OT: I have no idea what I was thinking when I created my screen name... bluebarry?!?!


Wow! And a year later the response! =) That's pretty cool to hear successes like this. Good luck!

I know, strange isn't it.

Almost a year and two months to the date.


Well, another year has come and gone... and I'm back again. Looks like I only pop in once or twice a year, lol. I figured I'd reopen my thread again.Big Smile


Congratulations on your progress! While the learning process seems slow sometimes, it's fun to go back and look where you were two years ago and see how far you've come.

So, please fill us in -- how did the software company venture work out?


Lee Dumond:

Congratulations on your progress! While the learning process seems slow sometimes, it's fun to go back and look where you were two years ago and see how far you've come.

So, please fill us in -- how did the software company venture work out?

I haven't done a whole lot with the business, I have a website but its only been up for about 2 weeks. Just vBulletin now. It will take a long time to get people to start comming to the website.

I decided to start learning PHP, Apache and MySQL I was suprised how similar PHP is to C#. Also been trying to learn CSS, Java Script and Ajax. So I really havent had time to worry about the business.

Opening two windows

I have a page which enables filter values to be entered and a View button
which opens a new window using
javascript:window.open('http://myurl?parameterlist','_blank'). The client
needs to see two filtered reports side-by-side from the same screen.

Scenario:
- enter filter criteria (e.g. date 12/05/2007)
- select View
- new window opens with filtered PDF displayed
- return to first form
- change filter (e.g. date 12/03/2007)
- select View
- need to open a third window with new PDF, but the second window is being
opened with the updated content.

Suggestions?Hi bigjohn,

The "_blank" parameter passed to window.open should open a new window every
time it invoked, do you mean that it always opens in your second window on
your side?

As Jacques mentioned, this issue doesn't seem to be related to ASP.NET and
is purely HTML issue. Could you please create a simpler html page and have
a test?

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Opening two windows

I have a page which enables filter values to be entered and a View button
which opens a new window using
javascript:window.open('http://myurl?parameterlist','_blank'). The client
needs to see two filtered reports side-by-side from the same screen.
Scenario:
- enter filter criteria (e.g. date 12/05/2007)
- select View
- new window opens with filtered PDF displayed
- return to first form
- change filter (e.g. date 12/03/2007)
- select View
- need to open a third window with new PDF, but the second window is being
opened with the updated content.
Suggestions?This seems to be less of a Asp.Net issue and more HTML.
Have you tried:
<a href="http://links.10026.com/?link=#" onclick="window.open('http://www.live.com/','_blank');return
false;">Test me</a>
The return false after the window.open statement will stop the document in
the browser from jumping around, but essentially that code should do the
trick.
Cheers
Jacques
"BigJohn" wrote:

> I have a page which enables filter values to be entered and a View button
> which opens a new window using
> java script:window.open('http://myurl?parameterlist','_blank'). The client
> needs to see two filtered reports side-by-side from the same screen.
> Scenario:
> - enter filter criteria (e.g. date 12/05/2007)
> - select View
> - new window opens with filtered PDF displayed
> - return to first form
> - change filter (e.g. date 12/03/2007)
> - select View
> - need to open a third window with new PDF, but the second window is being
> opened with the updated content.
> Suggestions?
Hi bigjohn,
The "_blank" parameter passed to window.open should open a new window every
time it invoked, do you mean that it always opens in your second window on
your side?
As Jacques mentioned, this issue doesn't seem to be related to ASP.NET and
is purely HTML issue. Could you please create a simpler html page and have
a test?
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

opening times

i want to create a page in asp.net using the calendar mechanism indicating the different opening times at a theme parks. There are 4 possibilities: peak, off-peak, standard and closed.....each type should be given a colour. In the calendar, the background of each date should be dependant on what type the fall in eg. if June 26 is peak (and peak type is given colour red) then the bground of this date should be red, while on December 4th is closed (and closed is given the normal white) then the bground is left untouched...how would I do this...I no how to select a date on the calender and change the colour but thats it....

hope sum1 can help...really need this 2 work!!!

THANKSOverride theDayRender event of the calendar and change the color from there.
should i store the date and the status (off-peak, peak, standard) as a seperate table in the database? how do I program to find the date in the table and depending on the status, make the background the colour that paritcular colour??

that will mean the table will have 365 inputs (or maybe since a lot of the time it is closed, can i program it to say, check if date is in the table if not then leave the background white else... )

enyone that can help?

Opening VS2005 sln from the windows shell

Hi,

I copied a VS2005 sln and it's related files (just the aspx which is right
beside it) from one m/c to another m/c into the exact same PHYSICAL DIR as
well as the exact same VIRTUAL DIR and APP DIR.

This doesn't work:
- Double clicking on the sln to make VS.Net open it. (Basically, nothing
happens.)

This does work:
- Open VS.Net, and pick the above sln to open. (The solution opens up fine
in VS.Net!)

Once I open it in VS.Net, I can now double click the sln to open it!

Does ths make sense to anybody?

Thanks
PraveenHi Praveen,

>Does ths make sense to anybody?

I haven't experienced such problem, I take the following steps to do a
similar task:

1. Create a new website TestWebSite1 in Visual Studio 2005.

2. Copy its solution files' directory(...\My Documents\Visual Studio
2005\Projects\TestWebSite1) to the target machine's corresponding
directory((..\My Documents\Visual Studio 2005\Projects\ )

3. Copy its web site source files' directory(..\My Documents\Visual Studio
2005\WebSites\TestWebSite1) to the target machine's corresponding
directory((..\My Documents\Visual Studio 2005\WebSites\ )

Then double click the solution file in the target machine's ..\My
Documents\Visual Studio 2005\Projects\TestWebSite1\ will invoke the VS2005
to open the TestWebSite1 solution in that machine.

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
-------
Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

opening web.config in browser

Hi ,

Is it possible to open web.config in my browser or is it not allowed due to security reasons.

I want to check if the xml in web.config is properly formed or not .

cheers,

Buddy

IIS will not allow you do open it through a browser assuming you are accessing it remotely. This is definately due to security because connection string and application specific information is usually stored in the web.config file.

Opening it with a browser directly from your file system shouldn't be an issue.

opening web projects for first time - VS2003 and SourceSafe issues

i have had this same issue numerous times on a fresh clean computers and can never work it out......

within sourcesafe - i have a VS2003 solution that contains a ASP.Net web project & an ASP.Net web service project.

i do a GetLatestVersion onto a folder location on my D:\ Drive

i create a virtual directories for each project & point them to appropriate folder locations

i now attempt to open this solution within VS 2003 and i get a prompt asking me to set my Project Location

it stateshttp://localhost/SchedulerWeb_1 andhttp://localhost/LCIDMEWebService_1

it appears to attempt to create another virtual directory?!!? i have remove the "_1" i get the red squiggly line?? why can i not select the VD's i created??

on another attempt i delete the 2 VD's i created and just open the project from scratch through VS 2003 but it then copies the files to C:\inetpub\wwwroot and sets that as my woking folder. which i dont want!! i want D:\ to be my working folder??

what do i do to get this to work correctly??

Cheers,
Craig

nobody??Sad[:'(]

hi,

of course you can set your own working foler. First, you should create a foler that you want to put your project, such as: D:\project1, in the main directory, you should click the "Browse..." button, and select your file path as the main directory. And then it will be ok.

I am not so sure whether I understand you clearly.

best regards.

Opening VS2005 sln from the windows shell

Hi,
I copied a VS2005 sln and it's related files (just the aspx which is right
beside it) from one m/c to another m/c into the exact same PHYSICAL DIR as
well as the exact same VIRTUAL DIR and APP DIR.
This doesn't work:
- Double clicking on the sln to make VS.Net open it. (Basically, nothing
happens.)
This does work:
- Open VS.Net, and pick the above sln to open. (The solution opens up fine
in VS.Net!)
Once I open it in VS.Net, I can now double click the sln to open it!
Does ths make sense to anybody?
Thanks
PraveenHi Praveen,

>Does ths make sense to anybody?
I haven't experienced such problem, I take the following steps to do a
similar task:
1. Create a new website TestWebSite1 in Visual Studio 2005.
2. Copy its solution files' directory(...\My Documents\Visual Studio
2005\Projects\TestWebSite1) to the target machine's corresponding
directory((..\My Documents\Visual Studio 2005\Projects\ )
3. Copy its web site source files' directory(..\My Documents\Visual Studio
2005\WebSites\TestWebSite1) to the target machine's corresponding
directory((..\My Documents\Visual Studio 2005\WebSites\ )
Then double click the solution file in the target machine's ..\My
Documents\Visual Studio 2005\Projects\TestWebSite1\ will invoke the VS2005
to open the TestWebSite1 solution in that machine.
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--
Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.

Opening window - changing title in code

I know this topic has been discussed many times all over the web but in my
case although i can make it work in a normal window but it falls flat workin
g
in a window where i generate a PDF from a SQL server report.
The window which i am changing the title for contains the codebehind to
render a sql server report and the following code is where it overrides the
title changing code:
Response.ClearContent();
Response.AppendHeader("content-length", result.Length.ToString());
Response.AppendHeader("content-disposition", "inline: filename=test.pdf");
Response.ContentType = "application/PDF";
Response.BinaryWrite(result);
Response.Flush();
Response.Close();
To test, i commented this part and the title changes. But i cannot comment
this as this is the part which converts the xml rdl into pdf.
Any suggested will be greatly appreciated.
Thanks and regards
Googleif the window is not hosting html, but using another ole viewer (say
acrobat) the viewer controls the title.
-- bruce (sqlwork.com)
"google" <google@.discussions.microsoft.com> wrote in message
news:3A74A8B5-C1FE-4291-8520-E4E3278B1289@.microsoft.com...
> I know this topic has been discussed many times all over the web but in my
> case although i can make it work in a normal window but it falls flat
working
> in a window where i generate a PDF from a SQL server report.
> The window which i am changing the title for contains the codebehind to
> render a sql server report and the following code is where it overrides
the
> title changing code:
> Response.ClearContent();
> Response.AppendHeader("content-length", result.Length.ToString());
> Response.AppendHeader("content-disposition", "inline: filename=test.pdf");
> Response.ContentType = "application/PDF";
> Response.BinaryWrite(result);
> Response.Flush();
> Response.Close();
> To test, i commented this part and the title changes. But i cannot comment
> this as this is the part which converts the xml rdl into pdf.
> Any suggested will be greatly appreciated.
> Thanks and regards
> Google
thanks for the reply.
So this means there is abosutely no way around this?
"bruce barker" wrote:

> if the window is not hosting html, but using another ole viewer (say
> acrobat) the viewer controls the title.
> -- bruce (sqlwork.com)
>
> "google" <google@.discussions.microsoft.com> wrote in message
> news:3A74A8B5-C1FE-4291-8520-E4E3278B1289@.microsoft.com...
> working
> the
>
>

Opening windows form from webservice

Hi Friends,
I am creating one application in asp.net 2.0,c# and requirement is to
open a winform while starting window and call the webservice to update
some information entered in the form.Now my requirement is to use
windows service to open the form..(Though i can use windows
application and put the exe in start-up folder to fullfil my
requirement)..And the form will take input from user.

So is it possible to open any form from Windows Service? I am trying
it since last few hours but failed to do so..Plz help..Waiting for ur
reply..

Thanks in advance.
priyabratain general no. a windows service does not have access to the desktop.
this makes sense if you think about it. the user can logout and login in
as another user.

-- bruce (sqlwork.com)

pintu wrote:

Quote:

Originally Posted by

Hi Friends,
I am creating one application in asp.net 2.0,c# and requirement is to
open a winform while starting window and call the webservice to update
some information entered in the form.Now my requirement is to use
windows service to open the form..(Though i can use windows
application and put the exe in start-up folder to fullfil my
requirement)..And the form will take input from user.
>
So is it possible to open any form from Windows Service? I am trying
it since last few hours but failed to do so..Plz help..Waiting for ur
reply..
>
>
Thanks in advance.
priyabrata
>


You really don't want to try to use a Windows Service to open any Forms or
applications that have a UI. Services start and run before any user is even
logged into the machine.
What you can do instead is put a shortcut to your application in the
/Startup folder and it will run as soon as a user has logged on to the
machine.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"pintu" wrote:

Quote:

Originally Posted by

Hi Friends,
I am creating one application in asp.net 2.0,c# and requirement is to
open a winform while starting window and call the webservice to update
some information entered in the form.Now my requirement is to use
windows service to open the form..(Though i can use windows
application and put the exe in start-up folder to fullfil my
requirement)..And the form will take input from user.
>
So is it possible to open any form from Windows Service? I am trying
it since last few hours but failed to do so..Plz help..Waiting for ur
reply..
>
>
Thanks in advance.
priyabrata
>
>

opening word doc in browser

i want to open a doc in browser withoun dialog-window open\save

i have this code

1FileInfo fileInfo =new FileInfo(e.Item.Cells[10].Text);
2 Response.Clear();
3 Response.ContentType ="application/vnd.ms-word;name=" + fileInfo.Name;
4 Response.AppendHeader("Content-Disposition","inline; filename=" + fileInfo.Name);
5 Response.AppendHeader("Content-Length", fileInfo.Length.ToString());
6//Response.OutputStream.WriteByte(7 Response.WriteFile(e.Item.Cells[10].Text);
8 Response.Flush();

but after it i still have window open\save."inline" don't help me, but all say about it

i need your help!

does anybody know??


Try removing line number 4 from ur code


line 4 is the main line , because containe word 'inline' it say browser to open file in browser window(it describes in rfc). line 4 must be present


Hi, you should not use AppendHeader(Content-Disposition) it forces the Open/Save dialogue. The following has been converted from C# to VB.NET

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
'Set the appropriate ContentType.
Response.ContentType = "Application/pdf"
'Get the physical path to the file.
Dim FilePath As String = MapPath("acrobat.pdf")
'Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath)
Response.[End]()
End Sub

If you want the tutorial that goes with the above code go to the link below, it is written in C# but you will get the idea. Hope this helps.

http://support.microsoft.com/kb/306654


Hi kkk111,

I'm not sure why you append fileInfo.Name after the ContentType. The MIME type should be right too. Please use "application/vnd.ms-word" or "application/msword" instead.


now i use this code

context.Response.Clear();//context.Response.ContentType = "application/vnd.ms-word"; context.Response.ContentType ="Application/msword"; context.Response.AppendHeader("Content-Disposition","inline; filename=" + fileInfo.Name); context.Response.AppendHeader("Content-Length", fileInfo.Length.ToString()); context.Response.WriteFile(file);//context.Response.Flush(); context.Response.End();
but the stupid window with buttons open\save still show up 

need to open an existing word document from asp.net page(in the browser itself)

used response.contenttype="application/msword"

U can also look into the site :http://support.microsoft.com/kb/178222

How to launch word from Internet Explorer


kkk11:

but the stupid window with buttons open\save still show up

Hi,

Glad, shravan_sai provides an alternative solution. You can try his solution too.

it looks like you don't want the dialog prompting to choose whether to open or save the file. I did see this dialog even though Content-disposition is set as "inline". There is a check box "Always ask before opening this type of file." right in the prompt dialog, you can uncheck this. This feature is ebled for security reason.

I'm using IE 7.0 for testing, and the code is following:

protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/ms-word";
Response.AddHeader("Content-disposition", "inline; filename=abc.doc");

String path = Server.MapPath("abc.doc");
Response.WriteFile(path);

Response.End();

}

Opening Word app from Web Page

Hi All

I am attempting to open a Word App from a web page and so far everything
works (After reconfig of dcomcnfg for Microsoft Word Document). I have one
minor problem, i cannot get the application to become visible
**********What am i doing wrong? is there something else that needs to be
done to make the application visible? I am using windows 2000 and Word 2002

thanks in advance

Samantha

Below is the Code i am using:
Class Declarations:

Public WrdApp As Word.ApplicationClass

Public wrdLetter As Word.Document

In Private Sub :

If WrdApp Is Nothing Then
WrdApp = New Word.ApplicationClass

WrdApp.Visible = True

WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize

End If

wrdLetter = New Word.Document

Dim strNewFilePath As String = "C:\Temp\"

Dim strUniqId As String = Date.Now.Hour.ToString() &
Date.Now.Minute.ToString()

Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() &
CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") &
strUniqId.Replace(":", "-") & ".doc"

Dim missing As Object

missing = System.Reflection.Missing.Value

wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True,
missing, missing, missing, missing, missing, missing, missing, isVisible,
missing, missing)

wrdLetter.Activate()

wrdLetter.Bookmarks.Item("TodayDate").Range.Text =
FormatDateTime(Date.Now(), DateFormat.ShortDate)

wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName

wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN

wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval

wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName

wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName

wrdLetter.SaveAs(strNewFilePath & NewFileName)

wrdLetter.PrintPreview()

'WrdApp_DocumentBeforeClose(wrdLetter, False)

wrdLetter.Close()

System.Runtime.InteropServices.Marshal.ReleaseComO bject(wrdLetter)

wrdLetter = Nothing

WrdApp.Application.Quit()

System.Runtime.InteropServices.Marshal.ReleaseComO bject(WrdApp)

WrdApp = Nothing

fileName = Nothing

isVisible = Nothing

readonlyAcc = NothingAre you trying to get Word to appear on the server or on the client?
This article demonstrates ways to interact with Excel & Word:
http://www.aspnetpro.com/Newsletter...p200309so_l.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Elizabeth Harmon" <EHarmon@.bloomingtonfarms.com> wrote in message
news:enMbUQctDHA.2932@.TK2MSFTNGP11.phx.gbl...
> Hi All
> I am attempting to open a Word App from a web page and so far everything
> works (After reconfig of dcomcnfg for Microsoft Word Document). I have one
> minor problem, i cannot get the application to become visible
> **********What am i doing wrong? is there something else that needs to be
> done to make the application visible? I am using windows 2000 and Word
2002
> thanks in advance
> Samantha
> Below is the Code i am using:
> Class Declarations:
> Public WrdApp As Word.ApplicationClass
> Public wrdLetter As Word.Document
>
> In Private Sub :
> If WrdApp Is Nothing Then
> WrdApp = New Word.ApplicationClass
> WrdApp.Visible = True
> WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize
> End If
> wrdLetter = New Word.Document
> Dim strNewFilePath As String = "C:\Temp\"
> Dim strUniqId As String = Date.Now.Hour.ToString() &
> Date.Now.Minute.ToString()
> Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() &
> CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") &
> strUniqId.Replace(":", "-") & ".doc"
> Dim missing As Object
> missing = System.Reflection.Missing.Value
> wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True,
> missing, missing, missing, missing, missing, missing, missing, isVisible,
> missing, missing)
> wrdLetter.Activate()
> wrdLetter.Bookmarks.Item("TodayDate").Range.Text =
> FormatDateTime(Date.Now(), DateFormat.ShortDate)
> wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName
> wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN
> wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval
> wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName
> wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName
> wrdLetter.SaveAs(strNewFilePath & NewFileName)
> wrdLetter.PrintPreview()
> 'WrdApp_DocumentBeforeClose(wrdLetter, False)
> wrdLetter.Close()
> System.Runtime.InteropServices.Marshal.ReleaseComO bject(wrdLetter)
> wrdLetter = Nothing
> WrdApp.Application.Quit()
> System.Runtime.InteropServices.Marshal.ReleaseComO bject(WrdApp)
> WrdApp = Nothing
> fileName = Nothing
> isVisible = Nothing
> readonlyAcc = Nothing