|
Hello
In my web application, I made a excel export of my screen (a simple informations grid !) and i tried to open that excel export on a new window (to not overwrite my browser content) and i used this instruction :
this.Page.RegisterClientScriptBlock("xlExport",@"<script language = javascript>javascript: window.open('/MyApplication/DefaultController.aspx?PageId=ExportXLPage&xlFiles=" + fileName + "','NewWnd','resizable=1,toolbar=1,location=1,status=1,menubar=1,scrollbars=1');</script>");
to inject this code dynamically into my asp page, so that this code will be executed and the page "ExportXLPage" will be opened.
And in that destination page i putted this intsruction,
Response.Redirect(FileName));
to display the excel file wich i made with these headers (just to mention) :
string str = "charset=utf-8";<br />
oStringBuilder.Append("<HEAD><META http-equiv=Content-Type = application/ms-excel;" + str + ";Content-Disposition:attachment;filename=" + fileName + ".xls></HEAD>");<br />
That worked fine on some machines and didnt on other ! In fact the new window opened and quickly closed whithout displaying anything on a machine with XP system and IE 6, and worked fine on , for example, a machine with WIN2000 and IE 6.
Even worst : when i pressed CTRL key and request that export, it worked and the new window was perfectly displayed with the usual options (save/open/cancel) of the excel file. And i have to mention that i already desactivated the POPUP blocking system of my internet explorer !! (that could be normally desactivated with hitting CTRL key).
Could that be related to the server's configuration (i mean system version...), or the client's configuration or may be both of them ?!?!
Or did i simply wrongly opened that new window or badly built my excel file ?
(All these problems occured when my application was published on my client server, but when i tested on my local machine, every thing was alright !!)
Thanks in advance for helping soon
|
|
|
|
|
please help me to find method to receive email using asp.net from localhost using gmail Mail
thanks allot
|
|
|
|
|
So you'd like to build a complete POP3 or IMAP application in ASP.NET then?
|
|
|
|
|
yes i need to no the configration of pop3
|
|
|
|
|
|
I need to receive mail not to send mail
|
|
|
|
|
|
Hi Friends,
I created an web user Control, that contents two command buttons
but when i used this control on my aspx.page,When I clicked on Ist button or II nd button it shows only one event.
I need differant events on each click of two differant button on that web-user Control
pls ..help me
Thanks
sbjadhav
|
|
|
|
|
I don't understand - you assigned different event handlers to the different buttons' Click event, right? Are you saying only one of the event handlers is actually triggering?
|
|
|
|
|
Hi Mike,
Thanks for reply,Yes I am also appriaciate with your answer, but here I created One Web user control using two Command Button...
When I used that Web user Control , Then I am not able to get different events for that both Buttons on Button click Event on that single webusercontrol.
I made webuser control using two command button & Used It on Aspx web Form.
when I click on any button it shows single event
Pls sugggets me ..
Thanks
sbjadhav
|
|
|
|
|
I see you are trying to explain this, and I am just not getting it. What I don't understand is how you are using this control. Let me walk through an example. Suppose I have these two files -
uc1.ascx :
<%@ Control Language="C#" %>
<script runat="server">
void Button1Click(object o, EventArgs e)
{
Response.Write("Button1 was clicked");
}
void Button2Click(object o, EventArgs e)
{
Response.Write("Button2 was clicked");
}
</script>
<asp:Panel runat="server" backColor="lightYellow"
borderColor="black" borderStyle="Solid" borderWidth="1"
>
<p>This is the user control, <i>uc1.ascx</i></p>
<asp:Button id="Button1" runat="server" Text="Button1"
OnClick="Button1Click"
/>
<asp:Button id="Button2" runat="server" Text="Button2"
OnClick="Button2Click"
/>
</asp:Panel>
usercontroltest.aspx :
<%@ Page Language="C#" %>
<%@ Register TagPrefix="uc" TagName="uc1" Src="uc1.ascx" %>
<html>
<head>
<title>UserControl Test</title>
</head>
<body>
<form runat="server">
<p>Here is the user control. Click a button to see what happens.</p>
<uc:uc1 runat="server" />
</form>
</body>
</html>
The first is a custom user control with two buttons, and the second is a page which uses the control. Each button in the user control is assigned its own event, and when you try it out you'll see each different event is firing correctly. Is this what you mean? Or are you using your user control differently?
|
|
|
|
|
i want to connect xml file ie xmlfile1.xml to a javascript file ie
coolmenu.js .Can someone give me the connection string for this.
I need it urgently.
thanks
|
|
|
|
|
ritu4321 wrote: i want to connect xml file ie xmlfile1.xml to a javascript file ie
coolmenu.js
How do you want to "connect" them?
ritu4321 wrote: Can someone give me the connection string for this
This line leads me to believe you think that javascript can connect to an xml file in a similar way that VB.NET/C# can connect to a database - sorry, thats just not the case.
ritu4321 wrote: I need it urgently.
It doesnt matter how urgently you need it, people here answer questions in their own time. You can get things quicker by rewording this to "I am on a tight deadline, so I would appreciate an answer as quickly as possible."
Now, all that aside - it looks like you are trying to build up a javascript driven menu system from an xml source (based entirely on the name of the js file). This can be done, but requires that you use server-side code to open the XML file, and server-side code to generate the relevant JS source. This is no small task and it is impossible to explain how to do so in one short forum message. There are literally hundreds of topics on the web that will help you, so get googling! Feel free to come back and post specific code-related questions when and if you have difficulty.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Connect how? Are you trying to connect to the xml file using ADO from code in the js file, or what?
---
b { font-weight: normal; }
|
|
|
|
|
Hello, I am working on an aspnet project that I just completed... in the main server, the framework is installed and I have a directory where I can put my part of the project... the rest of the project is in plain ASP while my part is in ASPNET with C# as the code behind..
I can run the project on my computer perfectly but when I try to access in on the browser using the main servers IP address, it gives me the option of saving or opening.... it brings up a pop up as if I want to download something..
Can someone please help me on this?
Thanks alot,
Michael
|
|
|
|
|
It sounds like IIS does not have the .aspx extensions registered for ASP.NET. Take a look at the aspnet_regiis[^] tool - one of its uses is to register ASP.NET with IIS.
|
|
|
|
|
Thanks Mike,
I just tried your solution and it works perfectly....
Greetings,
Commickey
|
|
|
|
|
I have one WIN user control created in C#; before the security update update KB912812(Cumulative security update for Internet Explorer)
I use this win control inside a ASPX page using:
<object id="MyControl" height="100%" width="100%" classid="/MyWinControls.dll#Module.TestDesign.Components.EditorControl"
<="" object="">
and it work perfect;
After the security update was install, I must activate the control before use it;
the message "Click to activate and use this control" appear, I must double-click on the control before use it;
I have try to use Microsoft solution to create a JavaScript function that will insert the text from the Object tag...but it doesn't work;
the control is no longer initiated;
Any idea how should I use the win control in order to skip the "activate"?
|
|
|
|
|
doru.popa wrote: I have try to use Microsoft solution to create a JavaScript function that will insert the text from the Object tag...but it doesn't work;
the control is no longer initiated;
You will be referred back to that solution. That's the way to do it.
---
b { font-weight: normal; }
|
|
|
|
|
How to pass variables from Flash to Asp.net? I am stuck.
|
|
|
|
|
|
hi
i have a database in sqlserver
and now i want copy it for other computer , for do this work:
i go to the this path:
c:\programfile\sqlserver\data and i want copy the two file with this name
ostan.MDF and ostan.LDF but i can not find them
what should i do?????
|
|
|
|
|
Copying those files while the server is using them is not very wise. Make a backup of the database to a file and restore it to a new database on the other computer.
---
b { font-weight: normal; }
|
|
|
|
|
|
hi all,
how can create a shortcut to my web project at the time of installation.
thanx in advance
coolsweety
|
|
|
|