|
I recommend Syncfusion controls. They have very good bunch of good controls.
|
|
|
|
|
Hi
I have a website where user needs ti upoad microsoft word document.
Is it better to save the doc in the database together with user profile or in physical folder?
|
|
|
|
|
|
Hello All,
I was testing a simple program to upload files to sever , but it failed with the following error message. "Access to the path '' is denied" I am using .Net Framework 3.5 in windows 7 machine. The code i have used is given below.
private void cmdSend_Click(object sender, System.EventArgs e)
{
if (filMyFile.PostedFile != null)
{
HttpPostedFile myFile = filMyFile.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen > 0)
{
byte[] myData = new byte[nFileLen];
myFile.InputStream.Read(myData, 0, nFileLen);
string strFilename = Path.GetFileName(myFile.FileName);
WriteToFile(@"D:\Temp", ref myData);
}
}
}
private void WriteToFile(string strPath, ref byte[] Buffer)
{
FileStream newFile = new FileStream(strPath, FileMode.Create);
newFile.Write(Buffer, 0, Buffer.Length);
newFile.Close();
}
Can someone help me?
Thanks in Advance...
Sebastian
|
|
|
|
|
Yu're being told that your application does not have the requisite permissions to the folder you are attempting to access.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
how to deploy a webproject in window7 having iis 7.5
|
|
|
|
|
|
I have more then 50 db call with different arguments (see below). So I am repeating my code every time I need to get datatable back from db. How can I have less code (just to pass argument and procedure name ?
Public Function Function1(ByVal arg As String) As DataTable
Dim strSQLProcedure As String = "mysp"
Dim db As Database
Try
db = New SqlDatabase(ConfigurationManager.ConnectionStrings("ConnectionStrings").ToString)
Using dbCommand As DbCommand = db.GetStoredProcCommand(strSQLProcedure)
db.AddInParameter(dbCommand, "@arg1D", DbType.String, arg
Using myDataSet As DataSet = db.ExecuteDataSet(dbCommand)
myDataSet.Tables(0).TableName = "tableName"
Return myDataSet.Tables("tableName").Copy
End Using
End Using
Catch ex As Exception
Throw
End Try
End Function
|
|
|
|
|
public void Execute(string procName, List<SqlParameter> paramerters)
{
using(SqlConnection conn = new SqlConnection(...))
using(SqlCommand cmd = new SqlCommand(procName, conn))
{
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.AddRange(paramerters.ToArray());
cmd.ExecuteNonQuery();
}
}
You could also use libraries such as Enterprise Library Data Access Application Block[^]
Also, note how the code snippet above was formatted. Next time you try it.
Failure is not an option; it's the default selection.
|
|
|
|
|
Here is what I come up with however I have isssue with adding AddRange. Could you tell me what I am doing incorrect? Where would I list my params DB type?
Public Function GetData(ByVal SQLProcedure As String, Optional ByVal SQLParams As List(Of Parameter) = Nothing) As DataTable
Dim db As Database
Try
db = New SqlDatabase(ConfigurationManager.ConnectionStrings("myConnection").ToString)
Using dbCommand As DbCommand = db.GetStoredProcCommand(SQLProcedure)
If Not SQLParams Is Nothing Then
db.AddInParameter(dbCommand.addRange, SQLParams.ToArray())
End If
Using myDataSet As DataSet = db.ExecuteDataSet(dbCommand)
DataSet.Tables(0).Copy
End Using
End Using
Catch ex As Exception
Throw (ex)
End Try
End Function
|
|
|
|
|
Please format your code snippets. This was pointed before and you were given an example. If you can't follow the guidelines here why should we answer your question?
Failure is not an option; it's the default selection.
|
|
|
|
|
Pretty much how I have done it.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
the issue I have is when I try to use addRange. it won't recognized it.
And also how do I pass params types?
|
|
|
|
|
Look Sir;
The following pre tag
<pre lang="VB.NET">Try
db = New SqlDatabase(ConfigurationManager.ConnectionStrings("myConnection").ToString)
Using dbCommand As DbCommand = db.GetStoredProcCommand(SQLProcedure)
If Not SQLParams Is Nothing Then
db.AddInParameter(dbCommand.addRange, SQLParams.ToArray())
End If
Using myDataSet As DataSet = db.ExecuteDataSet(dbCommand)
DataSet.Tables(0).Copy
End Using
End Using
Catch ex As Exception
Throw (ex)
End Try</pre>
draws a code block like this :
Try
db = New SqlDatabase(ConfigurationManager.ConnectionStrings("myConnection").ToString)
Using dbCommand As DbCommand = db.GetStoredProcCommand(SQLProcedure)
If Not SQLParams Is Nothing Then
db.AddInParameter(dbCommand.addRange, SQLParams.ToArray())
End If
Using myDataSet As DataSet = db.ExecuteDataSet(dbCommand)
DataSet.Tables(0).Copy
End Using
End Using
Catch ex As Exception
Throw (ex)
End Try
Help people,so poeple can help you.
|
|
|
|
|
You should ensure that you hit reply on the correct message. I believe you intended this response to the OP on the original post.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hello,
Please tell me how to integrate or use Sensex, nifty and Gold service in my ASP.NET with C# web application. Please reply me ASAP if any one know the solutions.
Thanks & Regards
Vijay
|
|
|
|
|
That is a very vague question; you should always try Google[^] first.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I think its possible using Google finance API
============================================
The grass is always greener on the other side of the fence
|
|
|
|
|
Hi,
Is there anything called Vertical Method available in .Net. If yes then what is that?
Any link or any guidance helps me a lot. I am not finding anything related to it in .Net on the internet.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
It would be on the up-and-up.
Need more context: what should be vertical? Text? Code? A bar of chocolate?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
Hi,
+ RETRO
|
|
|UNAMED FOLDER CREATED
|
| ALL CANCER FOLDER
|
|___BONE AND MARROW
|
|___CANCER AND ALL
I need to add the empty folder to RETRO folder.
I need to add UNAMED FOLDER to RETRO FOLDERHow to add it.
Here initScript is the script for javascript.
Thanks
S.GuhananthTh
|
|
|
|
|
I have tried to understand the code in your other post without success and I'm normaly only used to programm none-web-applications. But why dont't you use the TreeView-Control togehter with DataBinding?
|
|
|
|
|
WE are handling some more UI CHANGES IN TREEVIEW.
|
|
|
|