|
Did you set a breakpoint on that line? Did you see what the path evaluates to? Did you check if it's valid?
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Well the FileUpload Control---used to Browse and select the file works.
Another Button adjacent to the FileUpload button is used to save the file selected by the Browse button inside the server and that does not work. My browse button code is:
private void FileUpload_Click(object sender, System.EventArgs e)
{
string strFilename;
{
// Get the file name
strFilename = FileUpload1.PostedFile.FileName;
// Exit if no file name was entered
if (strFilename == "") return;
}
}
|
|
|
|
|
Hi,
Use Server.MapPath("yourFileName")
Naresh Patel
|
|
|
|
|
I entered:
protected void butUpload_Click(object sender, EventArgs e)
{
Server.MapPath("Contacts.xls");
}
So, Thank You Naresh. I entered the above code and it worked(sense that I did not get any error this time.
So, now I think I should see in my SQL Server if that file is loaded there???
|
|
|
|
|
Ok...I did not receive any errors on it. However, I checked SQL Server and the Excel file that I uploaded was not saved on it.
What else do I need to do inorder to save the uploaded Excel file on the SQL Server??
|
|
|
|
|
Hello !
1-I try to write the message i got in the catch block in a label but i don't know how ?
2-How i can go to a new line when i assign a string to a label ?
Thanks in advance ?
Assaf
|
|
|
|
|
Assaf82 wrote: I try to write the message i got in the catch block in a label but i don't know how
catch(Exception ex)
{
yourLabel.Text = ex.Message;
}
Assaf82 wrote: How i can go to a new line when i assign a string to a label ?
You want a line break inside label text? Just use Environment.NewLine where you want a break.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Thanks very much
Assaf
|
|
|
|
|
Hi,
Thank you for considering my query.
MS VS 2005 .NET installed and using the Microsoft online Help example: 'Walkthrough: Creating a User Control that Supports Lookup Databinding' I have encountered a problem with step 6. using the Data Source Window to set a column to use the new control. Steps 4,5,6 are unclear is this a .NET 2003 example ? and if so how do I continue?
During this walkthrough, you will learn how to:
1. Create a new Windows Application.
2. Add a new User Control to your project.
3. Visually design the user control.
4. Implement the LookupBindingProperty attribute.
5. Create a dataset with the Data Source Configuration Wizard.
6. Set the CustomerID column on the Orders table in the Data Sources window to use the new control.
Step 6 Setting the CustomerID Column of the Orders Table To Use the LookupBox Control
Within the Data Sources window you can set the control to be created prior to dragging items onto your form.
1. To set the CustomerID column to bind to the LookupBox control Open Form1 in the designer.
2. Expand the Customers node in the Data Sources window.
3. Expand the Orders node (the one in the Customers node below the Fax column).
4. Click the drop-down arrow on the Orders node and choose Details from the control list.
5. Click the drop-down arrow on the CustomerID column (in the Orders node) and choose Customize.
6. Select the LookupBox from the list of Associated Controls in the Data UI Customization Options dialog box.
7. Click OK.
8. Click the drop-down arrow on the CustomerID column and choose LookupBox.
Regards
dotman1
|
|
|
|
|
i need to convert a string to an array.
ex:
"Code Project"
i want the result to be split and converted to an array
str(0) = "C"
str(1) = "o"
str(2) = "d"
str(3) = "e"
str(4) = " "
str(5) = "P"
str(6) = "r"
str(7) = "o"
...
etc
the problem is how to split the string to make it into an array?
-TheCardinal
|
|
|
|
|
|
Just what i wanted.
thanks Mark
TheCardinal
|
|
|
|
|
Now a days this forum of Code project has disappointed me quiet often. It seems like people on this forum are busy replying some tutorial questions or busy elaborating stupid questions like difference between string and String etc. But when it comes to the question which involes bit of technicality query will remain unanswered eventhough you post it multiple time. I am sure the idea behind floating this forum was definitely not to answer the school project questions.
I feel quiet disappointed....
|
|
|
|
|
I think people have not got into the habit of using the 'view unanswered questions' feature, and things get lost. What was your question ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian,
I appreciate your quick reply. I put up this msg not because my questions didn't got any replies. But thing is now people don't even care to google their questions prior posting it here. Most of the time some new fellows post some very basic questions and people put whole lot of efforts in replying those questions. So hard core technical questions asked by other users remain unanswered.
In last 2 week's time i posted few questions which involved bit of technicality but none of them got replied. Before posting my question I always try to find out first using Google and when I don't find anything specific I post it here to get some directions. Hope other fellows also understand this and keep the noble idea behind floating this forum intact.
Thanks...
|
|
|
|
|
We have had a rash of basic newbie questions from people too freaking lazy to google. I try to call them out and flame them so others can igore the questions. Since you have posted this, likely your name will stick out so knowledgable members can take note to read your question.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: Since you have posted this, likely your name will stick out so knowledgable members can take note to read your question.
Leckey,
Sorry but i couldn't get the meaning of your above line...
|
|
|
|
|
I meant that some names stick out. Some for bad reasons. Since you posted your concerns, when you post a question in the future helpful members will probably try to take extra time to help you.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Christian Graus wrote: I think people have not got into the habit of using the 'view unanswered questions' feature, and things get lost
I agree. I try to look at all of the unanswered questions in all of the forums and try and give some kind of meaningful answer to the question.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Christian,
I have also seen this happen on more than one occassion as well. The "signal to noise ratio" on the C# forum (particularly) but also the .NET Framework and Windows Forms forums has gotten extremely high, to the point that it is sometimes hard to spot the legitimate questions.
Short of implementing some sort of waiting period for new members before they can post questions, I don't know of a solution. The "View unanswered questions" feature isn't really an option here because it will still suffer from the higher percentage of "monkey questions" being asked.
To make matters worse, I see a lot of these same people posting responses to other questions that are completely wrong (but sometimes have an "air of authority" that makes them sound reasonable/correct) and the right answers can then sometimes get lost in the weeds.
Just my 2 cents worth. It certainly won't stop me posting responses or asking questions, even if I do sometimes have to ask them more than once, because there are still a lot of people here that know what they are talking about and provide good responses when they are able.
A while ago you Chris Maunder posted a message in the lounge (http://www.codeproject.com/lounge.asp?Page=2&userid=157870&mode=all&select=2137020&df=100&forumid=1159&fr=12834.5#xx2137020xx[^]) about some possible changes to the forums. What was the end result of that?
Thanks,
Scott.
-- modified at 22:34 Thursday 16th August, 2007
|
|
|
|
|
KrunalC wrote: eventhough you post it multiple time
Perhaps that's why. People who cross post and repeat posts tend to get ignored.
I looked through your message history, and almost every question you asked got replies. Where do you feel that you lack replies?
---
single minded; short sighted; long gone;
|
|
|
|
|
One of my message I had put up yesterday only got deleted automatically. I don't know how. I put the same question again but remain unanswered.
|
|
|
|
|
Guffa wrote: People who cross post and repeat posts tend to get ignored.
While that's generally true, sometimes it becomes necessary to repost a question or move it from one forum to another. I have had at least one occasion where a message posted in one forum didn't get a response, and after waiting a week or more I reposted it to a different forum where it immediately got responses that helped me resolve the problem.
|
|
|
|
|
Scott Dorman wrote: it becomes necessary to repost a question or move it from one forum to another.
I do agree... Sometimes your question remain unanswered as it may not be viewed by person who know about it but if you repost it after sometime, there are chances that it get looked up and replied by person who know about it...
|
|
|
|
|
KrunalC wrote: stupid questions like difference between string and String etc
there is no stupid question. (maybe. stupid post might be like that one that you just post.. ) it doesn't matter whether it's easy or so difficult. we will answer if we like to.
Some facts about why we don't answer
#1. the first reason is simple. we don't answer because we don't know. we are not God so that it's not possible to know everything.
#2. We don't answer the question like "how to create search engine like Google?" or "Can you help me to do my assignment or homework?"
#3. Sometimes, in order to answer a particular question, it is required to have an environment to reproduce the issue. (For example, if someone is asking about PHP questions (eg: How to call procedure in MySQL to use in PHP?), we need to install PHP and mysql in our machine and try to reproduce the error in our computer. and find the solution for that. so, it is required more time to give the answer. )
Anyway, don't forget that we are contributing or helping other people's problems with FREE OF CHARGES. If you want the exact answer whenever you are asking, you should probably contact with the consultants with thousand dollars.
Thanks for understanding.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|