|
Please don't use textspeak. You might want to ask the author of the article you referred to.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi frns
i have created an application for uploading a file in ASP.net2.0 with VB its working fine. the actual task was to provide a file upload option to a client, when the client uploads the file the file should be stored in the server system in the specified location and also i maintain a database table with the title of the file which is primary key and path of the file and created date.
all these i have done but the problem is, when i upload the same file with other content or same content in it the file getting overwritten in the server system. so, i want to solve this problem.
i want to verify the file name before i insert the file into server system
|
|
|
|
|
sunilwise wrote: i want to verify the file name before i insert the file into server system
if (!File.Exist(Server.MapPath(YourvirtualPath)))
else
|
|
|
|
|
thanks for ur reply
i used
if (!File.Exist(Server.MapPath(YourvirtualPath)))
//Do file saving here
else //inform user
it says leading '.' or '!' can only appear inside with statement
so i made above code to
if (File.Exist(Server.MapPath(YourvirtualPath)))
//inform user
else
//Do file saving here
then also it is not working i tried to insert the file with same name the code is running into else part where as it has to be in the if condn what should i do plz help solve this problem
|
|
|
|
|
thank you dear i got it thanks for your help
|
|
|
|
|
File.Exist("FileName") is used to check the file is exist in the folder or not.
bEst Regard
pAthAn
|
|
|
|
|
thanks for ur reply
i used
if (!File.Exist(Server.MapPath(YourvirtualPath)))
//Do file saving here
else //inform user
it says leading '.' or '!' can only appear inside with statement
so i made above code to
if (File.Exist(Server.MapPath(YourvirtualPath)))
//inform user
else
//Do file saving here
then also it is not working i tried to insert the file with same name the code is running into else part where as it has to be in the if condn what should i do plz help solve this problem
|
|
|
|
|
How to deploy a project with .mdf file .is any problem occurs if a system contains only sql server 2000.i done the pjct in .net with sql server 2005 express edition for setting the roles management.when i deploy it into net any problem occurs .please reply detaily to this query
|
|
|
|
|
Wow. I can't work out what your queston is. An mdf is an Access database. If you built your app with SS2005, then SS2000 is probably not going to work.
SreejithAchutan wrote: when i deploy it into net any problem occurs
That has to be the vaguest problem description I have ever heard.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
Any method to solve this problem.how we deploy a file with .mdf in ss2005 mistake occurs whn we host the pjct containing the .mdf file.is it work same as we deploy through sql server database.
|
|
|
|
|
What do you mean by 'mistake occurs' ???
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
hai all,
i just want to know,
i had one gridview1 ,in that i have empID(stored in databse) and empname visible on gridview but is also stored in DB.
and also i have checkboxes in gridview....
if i selcect individual checkbox or selecting all check boxes that related empname should be send to the gridview2 of another page.
i know about the session but i just want some sample coding.
thanks in advance
Thanks
Subbu.
|
|
|
|
|
Take one ArrayList and Add Selected EmployeeName in ArralyList and bind it with second gridview.
for example
on button click event
ArrayList arrEmp=new ArrayList();
for(int i=0;i<gridview1.Rows.Count;i++)
{
if(((CheckBox)GridView1.Row[i].FindControl("chkId").Checked)
{
arrEmp.Add(((Lable)GridView1.Row[i].FindControl("EmpName")).Text);
}
}
GridView2.DataSource=arrEmp;
GridView2.DataBind();
bEst regArd
pAthAn
|
|
|
|
|
subbu.sk wrote: i know about the session but i just want some sample coding.
No need of using session here. Iterate through the rows in Gridview and check the checkbox is checked. If checked, select data and add it to a Datatable. Finally bind this Datatable to the second Gridview
|
|
|
|
|
iam getting value form database it is Y or N.Iam working with gridview and in that grid view i have a child contorl that is checkbox.if that value is Y means the check box has to check otherwise it sholud uncheck.
-- modified at 5:24 Wednesday 24th October, 2007
kirankumar
|
|
|
|
|
so what's ur problem ?
Koushik
|
|
|
|
|
the checkbox is not checking
kirankumar
|
|
|
|
|
try following code In ItemTemplate of gridview
<asp:CheckBox Id="chk" runat="server"
Checked='<%# Eval("FiledName").ToString()=="Y"?true:false' />
BesT Regard
PaThan
|
|
|
|
|
hi,
thanks its working fine
kirankumar
|
|
|
|
|
You've asked four different questions now with the subject of 'gridview'. Can I suggest you start providing more meaningful subjects, if you want to attract peple who can help you ?
I also recommend buying a book on ASP.NET, you seem to be asking a lot of beginner questions, it would really help you to learn some basics in a more structured format.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
hai all,
i just want to know,
i had one gridview1 ,in that i have empID(stored in databse) and empname visible on gridview but is also stored in DB.
and also i have checkboxes in gridview....
if i selcect individual checkbox or selecting all check boxes that related empname should be send to the gridview2 of another page.
thanks in advance
Thanks
Subbu.
|
|
|
|
|
I'm a beginer of ASP.NET developing.
I use some dll file for converting video to flv on web.
So, My Website runs sucessful on VS2005. but when client connect this web page, following error message is displayed.
Server Error in '/VideoUpload' Application.
--------------------------------------------------------------------------------
Retrieving the COM class factory for component with CLSID {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX} failed due to the following error: 800401f9.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX} failed due to the following error: 800401f9.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true">
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[COMException (0x800401f9): Retrieving the COM class factory for component with CLSID {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX} failed due to the following error: 800401f9.]
upload.Page_Load(Object sender, EventArgs e) +29
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Please help me!
|
|
|
|
|
Does the site the machine runs on have the COM component installed ? Why would you be using a web site to upload video and convert it ? If your app is taking a file path and then converting the file, the issue is that on your local machine, the file exists on the same machine as the COM dll, but for the user, that won't be the case.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
Hi
guys can any one let me know the reasons for IE crash while using .Net web application , which are specific to the .Net web application and caused by the .Net web application due to some error in code or any cioinfirguration issue,thankx in advance,
kindly reply ASAP,
|
|
|
|
|
Wow - I can't imagine how you used so many characters to tell us so little.
If IE crashes, the issue is not specific to .NET. .NET just generates HTML. If you're getting an error message, it's because of errors in your code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|