|
The problem is you don't understand what ASP.NET is, at all.
You get a filepath from your client, then you try to read the file on the server. Unless the server and client are the same machine, that isn't going to work, the file just isn't there.
SAve the file to the server file system in order to read it. Of course, this presents it's own problems, if you have more than one user at once and the file names clash, you'll be in trouble. Use Path.GetTempFileName ( something like that ) to work around that, or just File.Exists when you're saving it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Dear Christian Graus,
Thx for ur reply..The thing is..the .csv/excel file resides only in the client machine.The user has to select the .csv/excel file from his machine and then click the load button in order to get it in a datagrid and finally post it to the database server.
Regards,
Balaguru
|
|
|
|
|
That's obvious. But, you're trying to read the file using the client side path, instead of writing it to the server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I would like to use the BarcodeGenerator Class, located in the Microsoft.Office.RecordsManagement.PolicyFeatures namespace. I do not have this class, presumably because I do not have the microsoft.office.policy.barcode.generator.dll.
Does anyone one know what software this .dll comes with? I am running Office 2007 Enterprise and Visual Studio 2005 Professional.
Thanks in advance for any help you can offer.
Anubhava Dimri
919250168195
|
|
|
|
|
There's a class for generating barcodes right here on codeproject.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Google is broken where you live ? Sites like Amazon don't work ? Surely you can get this list by looking at existing sites ? If you're going to support cards, the card you can support will be in the docs of your payment gateway
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i want receive mail;
already i have send mail using smtp;its work well;
it's my concepts :but my problem how to receive mail;if i will run my programme then i will check user name and pwd;then goes to next page;when i will search ;who's send msg;and any body want receive my mail;then draft;
how to write a code;if use ant database;
pl help me
any codes and url path
|
|
|
|
|
Member 4546507 wrote: ;if use ant database;
What does this mean ?
There's an article on this very site on writing a POP3 server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is by far the most badly written post.
Please explain so we can understand you
|
|
|
|
|
hi..
i'm creating textboxes and imgebttn dynamically inside a table using javascript. i set some properties for the textboxes. but how can i bind 'onclick' events to the button. The code i used is below.
//for textbox
var txtA=document.createElement("input");
txtA.type = 'text';
txtA.id ='a'+lastrowIndex;
txtA.name ='a'+lastrowIndex;
txtA.className='textbox';
txtA.readonly='readonly';
//for imgbtn
var txtC=document.createElement("img");
txtC.id ='c'+lastrowIndex;
txtC.name ='c'+lastrowIndex;
txtC.className='images_del';
txtC.src="Images/delete_16x16.gif";
// txtC.setAttribute("onClick","alert('Ok')");//this is not working
Thanks in advance.
|
|
|
|
|
use the following
txtC.Attributes.Add("onClick",
"javascript:alert('Ok')");
.....
|
|
|
|
|
i want to bind the event, when its created.. not in the pageload. bcose its creating dyn using javascript...
|
|
|
|
|
SamRST wrote: // txtC.setAttribute("onClick","alert('Ok')");//this is not working
Chage it...
txtC.onClick = function MyClick()<br />
{alert('Ok');}
Hi,
Hope u ll get it.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
modified on Friday, May 9, 2008 1:38 AM
|
|
|
|
|
i cannot do this in pageload event, bcose i'm creating adding this control dynamic (no page reloading).
|
|
|
|
|
What's wrong with txtC.onclick = "alert('OK');" ???
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
there z no error, but event is not firing.. !!!
|
|
|
|
|
I believe it's meant to be all lowercase
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
what all i tried is.
txtC.setAttribute("onClick","alert('Ok')");
txtC.setAttribute("onclick","alert('Ok')");
txtC.setAttribute("onClick", "javascript:alert(this.id);");
txtC.setAttribute("onclick", "javascript:alert(this.id);");
txtC.onClick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert('Ok');";
|
|
|
|
|
Has to use event handler ...
txtC.onclick=doSomething;
function doSomething(e) {
alert('Ok');
}
.....
|
|
|
|
|
Thanks You So much my lovely GUY...
Its Worked...
Great work.. Dear...
i used ...
txtC.onclick = function(){ImageId(this.id);};
function ImageId(i)
{
alert(i);
}
|
|
|
|
|
Cheers
.....
|
|
|
|
|
have you tried this
var ele = document.getElementById('abc');
ele.onclick = showalert;
function showalert() {
alert('a');
}
--------------------
Check my other javascript posts
|
|
|
|
|
Hi there,
I'm having a webpage which has img control and i want to set alt message for that, but the message would be changable. So i want to put it in some class file. Below is my code but it's not working. Can u please suggest what i can do?
<img border="0" id="ImgHeader" alt="<%= HardCodedValues.HeaderText %>" style="height: 185; width: 760" />
and my class file is:
public class HardcodedValues<br />
{<br />
public static string HeaderText = "2K Billing";<br />
}
Regards n Thks
Sam.M
|
|
|
|
|
What does 'not working' mean ? What do you get ? I'd expect this to work.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|