|
What your cancel button does? It just closing the modal or done any othe operation ?
|
|
|
|
|
Thanx for replying,
The cancel button is not doing anything,it simply needs to close the popup and that too without going to server side. It could be done by setting,that button's id as cancelButtonId of modal popup.But since the button is not on the same page.It's rather inside the user control on that panel, I am not able to use this utility as well.
Please reply.
|
|
|
|
|
Hi,
I wrote the following code in the page load event
string path = clientServerXRef1.GetDownloadpath(company.ToUpper());
System.IO.FileStream fs = null;
fs = System.IO.File.Open(path + company.ToUpper() + "_" + projectID + ".mpp", System.IO.FileMode.Open);
byte[] btFile = new byte[fs.Length];
fs.Read(btFile, 0, Convert.ToInt32(fs.Length));
fs.Close();
Response.AddHeader("Content-disposition", "attachment; filename=" + projectID + ".mpp");
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(btFile);
and called it inside frame to downlaod the file from the same page. I do other process like setting flag and messages in the database to make sure this is downloaded for the first time. If it is for the second time i supposed to give some different messages in the label.
Here it what happens
When the file downloads, it is getting blocked by the popup blocker. When i click and allow download, it reloads the page, hence it is showing the message for the second download rather than showing the first one.
Regards
cmrhema
|
|
|
|
|
This is pretty lousy code. The way you build the path is prone to error. Most of it could be replaced with Response.BinaryWrite, which would remove load from your server.
You can't detect if a popup is blocked, so yuo need to change your approach
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Okay, ... my first attempt at a .net web service.
VB.net visual studio 2005, ...
on my workstation, it runs fine with View in Browser.
But on hosting service, I get the Parsing Error "Could not create type Filedownload.
On hosting service, if I put vb code in asmx file and remove codebehind statement, it does work.
Like it cannot find the codebehind code.
Tried the compiled file and dll, and .vb file.
Tried putting them in same folder as .asmx with codebehind = filedownload.vb (so not have to have access and find another folder).
Called hosting service, verify running .net 2.0.5
Checked/changed access to subfolders as full access.
Tried using actual www......\etc. ... host name then folder name.
How do I know Vitual name vs. literal name ?
STUMPED: Any ideas?
Filedownload.asmx contains:
<%@ WebService Language="VB" CodeBehind="~\App_Code\FileDownload.vb" Class="FileDownload" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.IO
<webservice(namespace:="http: tempuri.org="" ")=""> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
Public Class FileDownload
Inherits System.Web.Services.WebService
<webmethod()> _
Public Function DownloadTheFile() As String
Return "Hello FROM File Download THE File"
End Function
End Class
|
|
|
|
|
How did you host your web service on Hosting Server? Did you create virtual Directory in IIS?
|
|
|
|
|
This is on a hosting service's servers so I don't have access other than ftp my files to the httpdocs folder where I made a subfolder FileXfer and there reside my files and App_Code subfolder.
(I tried to call them and got someone that knows nothing other than it does run .net 2.0.5)
I did get on their hosting page and saw how I can change the .net version, but didn't see virtual names. I did create a subdomain FileXfer that points to the FileXfer folder.
I removed a file precompiled.config (or similar) and now referencing it through the subdomain is working.
http://www.mydomainname.com/FileXfer/FileDownload.asmx -- not work.
But accessing it physically with vb code in asmx file: www.mydomainname.com/FileXfer/Filedownload1File.asmx does still work.
Both work through domain:
http://filexfer.mydomainname.com/Filedownload.asmx"
I'm just new to this environment, otherwise a business app programmer. So I'm just not getting the stuff in the right place, the right way.
I think this is working, but I still don't understand why the combination of direct file name access (vs. through subdomain name) AND vb code in codebehind (separate file) does not work together.
modified on Friday, July 17, 2009 3:51 PM
|
|
|
|
|
Lori,
After developing our web sites/Web service what we need to do, just hosted it onto server. And this means we have push it on IIS Server. In IIS, we need to create virtual directory and need to set the properties for Default pages, .NET Framework version, Authentication settings etc. Then only it can accessable properly.
|
|
|
|
|
What could be the possible situations/scenarios when you want to have a dictionary object within dictionary?
Meaning a dictionary object which would take another dictionary as its key.
private Dictionary<Dictionary<string, string>, string> myDictionary = new
Dictionary<Dictionary<string, string>, string> ;
I mean, I'm trying to go through some code and its doing that, I am new to such complicated data structures such as ditionaries....and this doesnt even look like a common way most people use it.
Post people would have a string key and a string value ( or interger or something).
can someone elaborate on this?
Thanks a lot
Tina
|
|
|
|
|
What does this have to do with ASP.NET ? you would use it, if you need it. If you have no clear need, don't do it. Why are you asking ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I'm not sure what you meant...this is all done from a ASP .net page and that's why the questions was published in this section. Please educate me if there's a separate location pertaiing to questions regarding such data structures and their use.
Now my question is that I'm not familiar with Dictionary data structure, so I'm not sure how is stuff functioning in the code that I'm looking at right now written by someone else with no cmments or documentation...
I googled it quite a bit, but no one appear to be using Dictionary in a way that either its key or the value element are another DIctionary object.
Can anyone please share their experience if they've used it or are familiar with it.
Thanks
Tina
|
|
|
|
|
Tina P wrote: this is all done from a ASP .net page and that's why the questions was published in this section
But it's not related to ASP.NET, it's just vanilla C#, it could be in any C# project.
Tina P wrote: Please educate me if there's a separate location pertaiing to questions regarding such data structures and their use
C# forum for general C# questions
Tina P wrote: Now my question is that I'm not familiar with Dictionary data structure, so I'm not sure how is stuff functioning in the code that I'm looking at right now written by someone else with no cmments or documentation...
OK, well, that's another question.
You have a dictionary, and when you look up a key, the value you get back is another dictionary. So, you could use this, for example, to create a grid, look up x first, then y. Of course, you'd usually use a 2D array for that, but the point is, to get to the data you want, you obvously need to look up two values, not one.
It's just a dictionary, twice. You provide two keys to get to the end value.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I will please like someone to give me some help on how to creat an asp.net, Visual Basic forum.
|
|
|
|
|
|
Its not so tough?Anybody can do it for you but you have to pay for it.
|
|
|
|
|
Hi
when i press on F5
I am getting the below one
unable to connect to visual studio's localhost web server.
i tried by reinstall the webdev.webserver from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727..
but
it is saying 'The application failed to intialize properly (0*c0000007b).
Click ok to terminate the application.
Help me out..
|
|
|
|
|
Go to services and Restart SQLServer service. if that does not work, Try system restore. if system restore fails jst patiently reinstall visual studio.
|
|
|
|
|
Abdulhafeezo wrote: Go to services and Restart SQLServer service. if that does not work, Try system restore. if system restore fails jst patiently reinstall visual studio.
Why ?
|
|
|
|
|
|
Unable to Connect to the ASP.Net WebServer or Visual Studio on Localhost
This Link will fix your problem…..
http://softwares-u-need.blogspot.com/2009/10/downloadpage.html
YOUR PROBLEM WILL BE FIXED... I BET
The above link Is MY BLOG
Just do what it says….Please mail me if any questions…
PLZ POST YOUR COMMENT IN THAT BLOG, EVEN IF U HAVE TO ASK ANY THING...
Vibin
|
|
|
|
|
Unable to Connect to the ASP.Net WebServer or Visual Studio on Localhost
This Link will fix your problem…..
http://softwares-u-need.blogspot.com/2009/10/downloadpage.html
YOUR PROBLEM WILL BE FIXED... I BET
The above link Is MY BLOG
Just do what it says….Please mail me if any questions…
PLZ POST YOUR COMMENT IN THAT BLOG, EVEN IF U HAVE TO ASK ANY THING...
Vibin
|
|
|
|
|
Unable to Connect to the ASP.Net WebServer or Visual Studio on Localhost
This Link will fix your problem…..
http://softwares-u-need.blogspot.com/2009/10/downloadpage.html
YOUR PROBLEM WILL BE FIXED... I BET
The above link Is MY BLOG
Just do what it says….Please mail me if any questions…
PLZ POST YOUR COMMENT IN THAT BLOG, EVEN IF U HAVE TO ASK ANY THING...
Vibin
|
|
|
|
|
hi all ... good evening..
how to pass confirm box value to code behind.
Page.RegisterStartupScript("Error", "<script>var agree=confirm('Are you sure you want to delete?')</script>");
if (agree)
{
string service = grid.DataKeys[e.RowIndex].Value.ToString();
StringCollection col = BlogService.LoadPingServices();
col.Remove(service);
BlogService.SavePingServices(col);
BindGrid();
}
else
{
}
This my code. I cant get the value of the confirm box to code behind.Help me..
|
|
|
|
|
This is not how it works.
If you want to pass the value from client side to server, you need to do a post pack or use a webservice do the desired action.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Assign the confirmbox value in some hidden variable and postback the page.and accordingly the confirmbox value update the Grid.
Its better you postback the page when the user only press ok on the confirmbox.if not you need to delete so dont need postback
|
|
|
|