|
|
Hi,
Currently, i am using Visual Studio 2003. If i install ASP.NET 2.0 (not Visual studio 2005), can i continue to work in Visual Studio 2003?
Thank you
|
|
|
|
|
SUDHAKAR PALLAM wrote: can i continue to work in Visual Studio 2003?
yes you can continue with 2003
Regards,
Sandeep Kumar.V
|
|
|
|
|
Hi,
I need to create a treeview out of the folder and files from a specific FTP location. Any pointers on this would be of great help.
Thanks,
Wesley
|
|
|
|
|
Hi,
I have a gridview, I use a dropdownlist as edititemtemplate.
I don't wanna use SQLDataSource as the datasource for the dropdownlist. I use coding in code-behind page.
I get a problem, when button edit clicked, how to properly bind the data for the dropdownlist at the right time, just for the row clicked?
I've used gridview.rowdatabound event, but i have a problem because the checking proccess when i click the edit button gives error because it goes to gridview1.databind in gridview1.rowediting event before it enters the right row (the row that should be in edit mode).
Please help me check what's wrong, what the solution is... Thank you very much before and after.
Here is my code for rowdatabound and rowediting :
<br />
Protected Sub gridExpenses_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gridExpenses.RowDataBound<br />
Dim conn As New SqlConnection<br />
Dim cmd As New SqlCommand<br />
Dim da As New SqlDataAdapter<br />
Dim ds As New DataSet<br />
Dim dt As New DataTable<br />
Dim conString As String<br />
Dim rdr As SqlDataReader<br />
Dim row As GridViewRow = e.Row<br />
Dim i As Integer = row.RowIndex<br />
<br />
conString = System.Configuration.ConfigurationManager.AppSettings("connString")<br />
conn = New SqlConnection(conString)<br />
<br />
If (row.RowType = DataControlRowType.DataRow) Then<br />
'If (row.RowState = DataControlRowState.Edit) Then<br />
If row.RowState = DataControlRowState.Edit OrElse row.RowState = (DataControlRowState.Edit Or DataControlRowState.Alternate) Then<br />
Dim cmcd As DropDownList = CType(row.FindControl("comboCmcd2"), DropDownList)<br />
conn.Open()<br />
cmd = conn.CreateCommand<br />
cmd.CommandText = "SELECT mcom_idno, mcom_cmnm FROM tbl_mcom"<br />
rdr = cmd.ExecuteReader<br />
cmcd.DataSource = rdr<br />
cmcd.DataBind()<br />
cmcd.SelectedIndex = 0<br />
conn.Close()<br />
End If<br />
End If<br />
End Sub<br />
<br />
Protected Sub gridExpenses_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gridExpenses.RowEditing<br />
Dim conn As New SqlConnection<br />
Dim cmd As New SqlCommand<br />
Dim cmd2 As New SqlCommand<br />
Dim da As New SqlDataAdapter<br />
Dim ds As New DataSet<br />
Dim dt As New DataTable<br />
Dim conString As String<br />
<br />
conString = System.Configuration.ConfigurationManager.AppSettings("connString")<br />
conn = New SqlConnection(conString)<br />
<br />
gridExpenses.EditIndex = e.NewEditIndex<br />
<br />
conn.Open()<br />
cmd = conn.CreateCommand<br />
cmd.CommandText = "SELECT e.mexp_idno, e.mexp_mnth, e.mexp_year, e.mexp_amnt, e.mexp_cmid, c.mcom_cmnm FROM tbl_mexp e, tbl_mcom c WHERE e.mexp_cmid = c.mcom_idno"<br />
da.SelectCommand = cmd<br />
da.Fill(ds, "mexp")<br />
dt = ds.Tables("mexp")<br />
gridExpenses.DataSource = ds.Tables("mexp").DefaultView<br />
gridExpenses.DataBind()<br />
End Sub<br />
This is my code for the dropdownlist as edititemtemplate :
<br />
<EditItemTemplate><br />
<asp:DropDownList ID="comboCmcd2" runat="server" DataTextField="mcom_cmnm"<br />
DataValueField="mexp_cmid" SelectedValue = '<%# Bind("mexp_cmid") %>'><br />
</asp:DropDownList><br />
</EditItemTemplate><br />
|
|
|
|
|
Hi to all,
I am trying to delete all the files in a specified folder in my project. for that i have written the following function....
==============================================================================
Code
==============================================================================
public void DeleteTempFiles()
{
DirectoryInfo DirInfo = new DirectoryInfo(Server.MapPath("~/temp/"));
if(DirInfo.Exists)
{
foreach (FileInfo FI in DirInfo.GetFiles())
{
FI.Delete();
}
}
}
==============================================================================
But whenever i am running the program it gives the error as....
Error Deleting File or Folder
Cannot delete : It is being used by another person or program.
Close any program that might be using the file and try again.
.....
Anybody help me to solve this problem.
Pravin
|
|
|
|
|
pavya_Cool wrote: But whenever i am running the program it gives the error as....
Error Deleting File or Folder
Cannot delete : It is being used by another person or program.
Close any program that might be using the file and try again.
As Error message is saying might be your application is using some of those files
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
pavya_Cool wrote: oreach (FileInfo FI in DirInfo.GetFiles())
Fileinfo class has opened the file. So try the following
foreach(string strFileName in Directory.GetFiles(YourPath))
{
File.Delete(strFileName);
}
|
|
|
|
|
When Click the internet browser inside button e.g Back, Forword and Close Click only Three Button then display the message.
This problem had been coming for last three days.
Please Help me
-- modified at 5:15 Wednesday 17th October, 2007
|
|
|
|
|
Look - people have replied to you on this subject many times. If you have a specific problem then please do people the courtesy of picking one of the many threads you've created and replying on that one. Don't keep creating posts - it's unfair to everybody else, especially those who may follow the thread in future to see if there is a solution.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Is this a right way to insert bulk data from one DB to an other DB.
Public Function UpdateDs(ByVal QueryStr As String, ByVal ds As DataSet) As Boolean<br />
<br />
Dim DataSet1 As System.Data.DataSet = New System.Data.DataSet<br />
dbConn = New System.Data.SqlClient.SqlConnection<br />
dbConn.ConnectionString = conStr<br />
Dim adp As New System.Data.SqlClient.SqlDataAdapter(QueryStr, dbConn)<br />
adp.Fill(DataSet1)<br />
<br />
<br />
Try<br />
DataSet1 = ds.Copy<br />
adp.Fill(DataSet1)<br />
adp.Update(DataSet1)<br />
Catch ex As Exception<br />
<br />
Return False<br />
End Try<br />
<br />
End Function
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
How could it be? You are only accessing one database in the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
thx for your time
then what is the esiest way to insert it to another database
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
BasharatAli wrote: then what is the esiest way to insert it to another database
Use the facilities of the database, e.g. DTS. Don't try to reinvent the wheel.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i have a stored procedure , there i have 6 parameters and witing a insert query.i have to do the insetion 4 times .Now my question is i should have 24 parameters in the stored procedure or i should call the stored procedure 4 times?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia - what do you think the answer should be? Just step back and think about it for a while, and then when you've figured it out, do it.
A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Good hint. It's calling procedure 4 times. Right ?
|
|
|
|
|
N a v a n e e t h wrote: It's calling procedure 4 times. Right ?
If the data is getting inserted into the same table then yes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You have been here long enough to know better than to write such a useless subject line as "please help".
Sonia Gupta wrote: i have a stored procedure , there i have 6 parameters and witing a insert query.i have to do the insetion 4 times .Now my question is i should have 24 parameters in the stored procedure or i should call the stored procedure 4 times?
Neither way is wrong. Which option that is better depends on other factors that you haven't mentioned, like if there will always be exactly four inserts, and if they are similar enough to reuse the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
For example, if user enter
http://localhost/myweb/index.aspx
It will show the page.
But if user enter
http://localhost/myweb
It will show the list of files in myweb directory.
How to protect this?
Thank =)
|
|
|
|
|
bug_aonz wrote: ut if user enter
http://localhost/myweb
It will show the list of files in myweb directory.
How to protect this?
Unchek "Directory Browsing" in IIS settings
|
|
|
|
|
N a v a n e e t h wrote: Unchek "Directory Browsing" in IIS settings
Can u do that in the real situation? if i rent a web host how can i Unchek "Directory Browsing" in IIS?
Can i config the web.config file for this case? How?
=)
|
|
|
|
|
bug_aonz wrote: if i rent a web host how can i Unchek "Directory Browsing" in IIS?
You have to raise a support ticket, and your provider will do this for you. This can't be done through web.config
|
|
|
|
|
|
Hi,
I have an Web application (ASP.NET,C#) for Downloading files from FTP server.
I have done code for downloading files from this FTP Server & it's working perfectly. Now, I have hard coded the Destination location.
I need to open a FileDownload Dialog Box, to set the location for downloading files.
For example, when we download a file thru HTTP, there will be a dialog box with "Open", "Save", "Cancel".
Like this, I need to implement in my Application.
Guyz, any idea ????
regards
-- modified at 3:04 Wednesday 17th October, 2007
Mohamed Nazeem
Software Engineer
Bangalore
|
|
|
|