|
Or pass data through addressbar as querystring.
|
|
|
|
|
Hi all,
public void ftpfile(string inputfilepath)
{
//here correct hostname or IP of the ftp server to be given
string ftpfullpath = "ftppath";
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
ftp.Credentials = new NetworkCredential("uid", "pwd");
//userid and password for the ftp server to given
ftp.KeepAlive = true ;
ftp.UseBinary = true;
ftp.Method = WebRequestMethods.Ftp.UploadFile;
FileStream fs = File.OpenRead(inputfilepath);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();
Stream ftpstream = ftp.GetRequestStream();
ftpstream.Write(buffer, 0, buffer.Length);
ftpstream.Close();
} this is the function im using for ftp uplod and im getting an error
The underlying connection was closed: An unexpected error occurred on a receive
i have set my web.config as
<httpRuntime maxRequestLength="1048576" executionTimeout="3600"/>
What will be problem with this
Help me plz,
Thanks In Advance
|
|
|
|
|
What is the line at which you are getting error?
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
|
I am getting error at ftpstream.Close();
|
|
|
|
|
Dear All,
I am lokking for Microsoft Application Blocks(BLL & DAL) for Oracle Database in ASP.NET 2.0 Web Application. Please help me with your suggestions and guidance.
Thanks
With Regards
Vivek
|
|
|
|
|
Download the ODP.NET component from oracle web site
or just simply get the latest the microsoft enterprise library for .net 2.0 then utilize the
system.data.oracleclient namespace.
FYI: sometimes the system.data.oracleclient component is not automatically loaded in “add reference” screen. You need to add this manually. The dll are located at “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727” then look for System.Data.OracleClient.dll.
|
|
|
|
|
hi friends,,
i am trying to do edit the row in GridView ....
this is the coding for updating
System.Web.UI.WebControls.TextBox cName = new System.Web.UI.WebControls.TextBox();
cName = (TextBox)myDataGrid.Rows[e.RowIndex].FindControl("Contactname");
SqlConnection myConnection = new SqlConnection("Data Source=DAYAKAR\\sqlexpress; Initial Catalog=hospital;Integrated Security=true");
SqlCommand myCommand = new SqlCommand("SP_UpdatePerson", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.Parameters.Add(new SqlParameter("@Contactname", SqlDbType.VarChar, 50));
myCommand.Parameters["@Contactname"].Value = cName.Text;
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
myDataGrid.EditIndex = -1;
BindData();
in this i got error in
cName = (TextBox)myDataGrid.Rows[e.RowIndex].FindControl("Contactname");
so i modified as
TextBox txtName = (TextBox)CustomerGrid.Rows[e.RowIndex].FindControl("txtContactName");
even i am not getting the updated value... in the textbox.... so that i can update that value in the DB...
kindly help me soooon...
|
|
|
|
|
did you make a postback control?
|
|
|
|
|
No,.... but how to make it???....in gridview???...i didn;t fine that control...
|
|
|
|
|
thanks..sosyopat... i solved that issue...
bye
|
|
|
|
|
hi viewers,
i am doing a small project on asp.net. In that project i need to display date,month,year from drop down list.wat's the tool to display that?or we need to create it? but one thing is,i dont want to use calender tool to dispplay d-m-y.we need to select those three(date,month,year)from drop down list. plz tell me asap.
thanks in advance,
|
|
|
|
|
There are some tools freely available on internet.You can download n use it
Cheers!!
Brij
|
|
|
|
|
just do one thing take three drop down list and in that three u have enter manually dd and mmm and yyyy in the year section u add ten year after this year by programetically and take the values and merge them in dd/mmm/yyyy formate and if u think any problem then told me
|
|
|
|
|
can any one please guide me how can i pass multiple stored procedure names to a crystal report???
i have a crystal report rpt1 and i want to pass sp1,sp2,sp3 from C# code behind file how is it possible???
i dont wanna use data set i am passing parameters and descrete values to crystal report.
or i will have to create file same file with three stored procedure in Sea Gate Crystal report viewer????
umerumerumer
|
|
|
|
|
Dear
You have to create one main report and seprate reports for each stored procedue and call then as a sub report in the main report.
With Regards
Vivek
|
|
|
|
|
iam using javascript window.open method to open child popup window and want to retreive some values from parent to child window using request. form as iam using query string for it but the values are too large and the length of query string is very big now
please tell me any solution for this
|
|
|
|
|
You can do one thing, you acn access the variable of parent page from the chaild page so without passing it as a querystring ,you can directly access from parent page.
Another way,you can use session for it
Cheers!!
Brij
|
|
|
|
|
I have a panel that is set to show scrollbars when necessary.
The panel has ResizableControlExtenders attached to it.
When I use a scrollbar on a panel and then release the mousebutton, the drag handle of the respective panel "jumps" - see attachment. I can move the scrollbar to its original position to reset the handle, however.
Please help
|
|
|
|
|
Hi,
I have a report which consists of asp labels as well as gridview.I know how to export grid view,but labels are overlapped when i export it to excel.I have used
Label1.Rendercontrol(hw),also but still the labels are getting overlapped.
Thanks & Regards,
Annu
|
|
|
|
|
Has any one has used singelton pattern in any of their projects,
can i used where i want to access database.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Yes you can use.
you can also uase the same in database access.
Generally it 's upto your requirement.do the feasiblity study so you can find which pattern will be better for you.
Cheers!!
Brij
|
|
|
|
|
Mogaambo wrote: can i used where i want to access database.
Depends. I have seen projects using singleton for keeping the connection string.
If you have custom configuration files, you can read them and keep in a singleton instance. So that for all the later requests can be served from this singleton instance.
If you plan to use it for ASP.NET projects, make sure your singleton instance is thread safe.
|
|
|
|
|
Mogaambo wrote: can i used where i want to access database.
That would mean that only one thread at a time can access the database. You would have to use locking so that only one thread at a time uses the singleton, which totally defeats the purpose of using a singleton in the first place.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|