|
One more thing..
you need to use namespace System.IO;
using System.IO;
|
|
|
|
|
ok, when you are upload file to the server your should define the any specific map path and then check if exist then delete otherwise leave it.
Parwej Ahamad
|
|
|
|
|
Thank You to both of you - Suman and Parwej
|
|
|
|
|
Hello,
I would like to show a gif image like a progree bar when uploading a image,
can any one help me?
thanks in advance
Regards,
sundar
|
|
|
|
|
|
can anybody tell me what does .sln file do exactly and wht it contains ? and what is the diffrence between .csproj and .sln file ?
|
|
|
|
|
anything in .NET is a solution! a solution contains one or more projects such as web project,win project, class library project etc. if you lose .sln file you can easily make a blank solution and add your existing projects to it !

|
|
|
|
|
hello,
can anybody explain what visual studio.net actually doing while loading a solution and displaying message "Merging web server state..." in status bar ?
and exactly wht happens when vs.net opens any solution also when visual source safe is used.
regards.
max
|
|
|
|
|
hi
I want to open Excel file on my local computer .
File is located on server's drive for eg.D\Project\Test.xls
How can i open this file on clients computer in Asp.Net.
I try this Code
public Excel.Application ExcelObj = null;
string filepath = AppDomain.CurrentDomain.BaseDirectory + @"PO_Attachment/"+lstattach.SelectedValue.ToString() ;
theWorkbook= ExcelObj.Workbooks.Open(
filepath, 0, true, 5,
"", "", true, Excel.XlPlatform.xlWindows, "\t", false, false,
0, true);
Excel.Sheets sheets = theWorkbook.Worksheets;
Excel.Worksheet worksheet = (Excel.Worksheet)sheets.get_Item(1);
ExcelObj.Visible = true;
But file can't open
So plz give solution or Code for opening this file
Its Very Very Argent
So plz Help me
thanks
Vivek Deshpande
|
|
|
|
|
|
Hello...
Can someone tell me how to save and retrieve a gif/doc file to a my sql server. i need to upload resume and photograph through my form.
Nizha
|
|
|
|
|
Dears
I’m using VS2005 , if we use postbackURL property button or link button it will pass all controls values in page (form method and encrypted ) to second page and we can get the values in second page by using Request.form[“ControlName”]
Now , I need same way to pass the variables values in code behind of page1 to page2 by using postbackURL
Can any one explain how I can write do it
thanks a lot
-- modified at 8:53 Monday 16th October, 2006
|
|
|
|
|
Hi,
For ex, in Source's (Source.aspx) CodeBehind (C#),
string val_a="abc";<br />
string val_b="def";<br />
<br />
LinkButton.PostBackURL="Target.aspx?a=" + val_a + "&b=" + val_b;
You can get the values in Target page(Target.aspx.cs) using,
string a = Request.QueryString["a"].ToString();<br />
string b= Request.QueryString["b"].ToString();
Also You may use PreviousPage property of ASP.NET 2.0
The following could be added to Target.aspx:
<%@ PreviousPageType VirtualPath="~/Source.aspx" %><br />
<br />
TextBox nameBox = PreviousPage.NameBox;
Here,NameBox is the TextBox control in the Source Page.
-- modified at 3:31 Monday 16th October, 2006
Regards,
Jay
|
|
|
|
|
The main issue is the "Select a Format" and "Size" dropdown boxes on the ReportViewer. Those controls seem to always have the highest z-order and I cannot show anything ontop of them....
- What I am trying to show ontop of them...
I cannot seem to place a <div> using absolute positioning with a table inside the <div> tags on top of those combo boxes...
- Why Would I want to do such a thing...
I am using Microsoft Visual Studio 2005 ASP.Net 2.0, ReportViewer with rendering LocalReports that show RDL Files. Showing the RDL files are working just fine with the ReportViewer but I want to have prompt options like SQL Server Reporting Service. I also have this working pretty good also.
- So Whats The Problem Again....
I searched the web for a combobox with check buttons like SQL Server Reporting services multivalue option and was unable to find one, so I made my own custom control that does nearly the same thing. My drop down is a <div> tag with a table with checkboxes. When I tell my <div> to have visibility eqaul to "visible" it show the drop down correctly on top of everyting on the page but always under the ReportViewer Comboboxes.
I have tried setting the z-order to 999999 on my <div> tag, <table> tag, and <input> tags and it is still under the report viewer comboboxes.
Please Help....
Chris
|
|
|
|
|
In IE the combo box is rendered using the windows control and ignores z-order. Most menu scripts and the like find the combox box controls and hide them while they are over where the controls should be.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
I have a aps.net website where I'm trying to show an alert via javascript.
I'm setting a string variable to the following in the code-behind:
m_strAssemblyMisMatch = "<script language=\"javascript\">alert(\"" +
"This website may not function as expected due to assembly version \n" +
"mis-matches that were detected during application initialization. The \n" +
"following mis-matches were found:\n\n" +
strBadAss +
"\nPlease login and notify a support representative." +
"\");</script>";
The strBadAss variable contains text like
"\tAssemblyNameOne\n\tAssemblyNameTwo\n\tAssemblyNameThree\n" .
I'm rendering this string in the aspx page with the following statement:
<%=m_strAssemblyMisMatch%>
If I leave the linefeed characters in the string, I get a javascript error claiming there's an un-terminated string constant, and the alert dialog is NOT displayed. If I remove all of the linefeeds, the alert dialog IS displayed (with everything on one line of course).
In an attempt to see if there was indeed an un-terminated string, I tried the following:
m_strAssemblyMisMatch = "<script language=\"javascript\">alert(\"" +
"This website may not function as expected due to assembly version \n" +
"\");</script>";
Once again, if I left the linefeed in the string, it wouldn't work, but if I removed the linefeed character, it was fine.
Can anyone tell me what I'm doing wrong?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Just a guess - the newline escapes are being turned into actual newlines by the C# compiler, so by the time they make it onto the page, you now have a string spanning multiple lines (which JS doesn't like). Try double escaping the newlines (\\n).
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Yeah - figured that out and came here to update my message. I hate C#.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You have to Quote the JavaScript string to make it work. As \n gets converted to a new line.
Look at the implementation of System.Web.UI.Util.QuoteJScriptString(String, Boolean) using Reflector.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
|
Wrong answer, but thanks for responding. I had to double-backslash the linefeed character to fix it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I had to double-backslash the linefeed
That is what I call Quoting. The System.Web.UI.Util.QuoteJScriptString(String, Boolean) is a general purpose function that converts everything like tab characters and special unicode characters to JS friendly form.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
|
This is often known as escaping, which comes from the use of the escape character (0x1b) in environments like DOS and with matrix printers.
Also the term encoding is sometimes used, as in the HtmlEncode and UrlEncode methods.
---
b { font-weight: normal; }
|
|
|
|
|
On Button Postback an Aspx Page runs the following onclick C# event handler:
{
// dr[“Content”] - DataRow Item type byte[] where is a song in mp3 format
ar = dr[“Content”];
Response.ContentType=“audio/mpeg”;
Response.Clear();
Response.BufferOutput = true;
Response.BinaryWrite(ar);
Response.Flush();
}
I received error in Response.Flush() – The remote host closed the connection.(HttpException).
Please help me,
Thanks
hector
|
|
|
|
|
I think you forgot the specify the length of your response. This should be equal to the size of the audio file you are sending to the client. Now the connection gets closed in the middle of the operation, because the client thinks he's done downloading the data and there's nothing left.
WM.
What about weapons of mass-construction?
|
|
|
|
|
How can I set StreamOutput Lentgth ?, I think “al.length” was taken for “Response.Binary(al)” but maybe not. In debugger Response.OutputStream.Length is showing a SystemNotSupportedException.
Also “Response.OutputStream.Length” is readonly
|
|
|
|