When i make a new web site in VS 2005 Pro, it keeps the source files in my IIS root directory. When I move my site to my server, I'd like to keep a local copy in the same folder as the solution (.sln) file.
I think it was possible in VS .NET 2003, or even standard.
Please correct if I misundertand your question. As you might already know that, with VS 2005 you are much more flexible in controlling the web site, in this case you simply use the Copy Website function to copy the whole web site from the root of IIS to the folder containing the solution file. Or you simply copy the current folder of your web site to the expected directory, then simply open it in the current solution using the File System.
I have a database with a table called merchant and it has the following fields :
1)MerchantID - GUID - Merchants ID
2)MerchantName - varchar(50) - Name of the merchants
3)MerchantPoints - varchar(50) - Points the merchants give
4)MerchantURL - varchar(100) - website of the merchants
I am using asp.net and C#. I want the records from the merchant table to be displayed in the following format
alphabetically with the corresponding alphabets as headers and the corresponding data under each header.
Barnes & Nobles
Bath and Body
Discount Contact Lenses
and so on. And each of the above merchant name must be linked to the MerchantURL in the merchant table.
I have just started programming in C# can sometell me which is the best way to do it.
The simple way to display data in the alphabetical list is that you sort the data source before binding it to the control. In your case, you might need to use nested controls, it means you can use a parent datagrid control, and each child datagrid control placed in the parent control is used to display data of a particular character.
You can use the DetailsView.Rows property to access the automatically added textbox from a specified row. However, you cannot access the textbox using the ModeChanged event since it hasn't added yet. Instead, you should use the ItemCreated event and do a checking on the CurrentMode property.
My client needs a feature added to his site that allows his customers to upload a CSV file and after I verify that it's all valid data, it's sent to the database.
I'm currently at the point where the CSV file has already been uploaded to the server and I'm now reading the data piece by piece to ensure it's valid. I'm taking the CSV data and placing it into a dataset and then into a datarow. My problem is for some reason, I can read every single row on the CSV spreadsheet EXCEPT for the first row. No matter what I do, it seems to get skipped.
Any idea what I may be doing wrong by looking at the code below? Row "0" of the dataset always ends up taking data from the csv's 2nd row and Row "1" of the dataset takes info from the csv's third row. The CSV's first row is never retrieved:
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=Text;"
Dim objConn As New OleDbConnection(sConnectionString)
Dim objCmdSelect As New OleDbCommand("SELECT * FROM test.csv", objConn)
Dim objAdapter1 As New OleDbDataAdapter()
objAdapter1.SelectCommand = objCmdSelect
Dim objDataset1 As New DataSet()
Dim dr As DataRow
dr = objDataset1.Tables("Test").Rows(0)
a = dr.Item(0)
b = dr.Item(1)
dr = objDataset1.Tables("Test").Rows(1)
a = dr.Item(0)
b = dr.Item(1)
I am working on an asp.net application and have been stuck in this problem since last week. I am trying to access a foxpro free table which resides on another machine from a web server having IIS 6.0 (Windows 2003 server). Unfortunately, I am unable to open a connection to the table and it gives me an Oledbexception saying invalid file or path name when trying to read and bad login or password when trying to write to the machine. Both the machines are on a workgroup and both have the same usernames and passwords to login. I have tried several things like adding aspnet machine account, IUSR accounts etc. I am not sure if I have done these things correctly, since I have a limited knowledge of Windows Network Administration. Any help would be greatly appreciated. Posting the question here, since I am sure other ASP.Net application developers would have faced this issue.
Somebody knows how to create online resume in C#(ASP.NET) as www.bayt.com are doing. If someone knows abt it plz help in this regard, i'll be thankful him/her for his/her assistance for me. and urgent plz. If u have an article or sample regarding this topic plz tell me.
We have a shared Windows 2003 machine on which different groups create
their own ASP.NET 2.0 applications as a virtual directory under a root
How can I set permissions on the root folder, so that the ASP.NET code
written by any of these groups cannot read files from other folders?
Since all folders are under one common root, I tried to revoke read
access for NETWORK SERVICE in the root folder. But after that none of
the applications come up. If I grant Read permission to NETWORK
SERVICE, any user can read files from any folders.
All sites are under one Application Pool. It is difficult to create separate pool for each site, because they are virtual directories, not web sites.
What is the best way to set folder and file permissions on member folders?
I do not have any control over the other groups. Moreover, since this is an IIS 6 and all virtual folders are under one Application Pool, all of them use the same identity "NETWORK SERVICE", unless each group do a "impersonate". But I can't force each group to use impersonation!
I was thinking that it could work to have a Networkservice1, NetworkService2 and so on, accounts where your applications can use for anonymous access in IIS, and for the folder's security, fix these accounts.
nah... I'm clueless sorry I haven't worked in an environment like that. I'm just misleading here.
I am in the project to display the current status that is collected from all other objects. For example to display the alarm of front door.
There is no user involved. So there is no postback. How to use Ajax to query server? Can you give me a simple example? Remember the current status is posted at random. So there should not be to pull the server at fix time interval.
This depends on where you are removing / adding the controls... is it on ItemDataBound or ItemCreated event?
I believe you are doing it in ItemDataBound since you say you do this depending on the number of records?
the problem is this initialization is not done in the postback if you're doing this on the ItemDataBound event, it's not a viewstate issue.
If you want to keep your customization, this has to be done in the ItemCreated event, because this event is generated when databinding and in every postback (ItemDataBound event is only raised when the DataBind method is called from the DataGrid).
well thanks for your response, I got you, but I don't really know how to handle my problem, her it what I am trying to do:
I have a datagrid with all template columns, first two columns contain textboxes (100 rows with empty textboxes and dropdownlists).
Now first time user will enter value in first text box or second text box. Then user hits a button, and I am retrieving value for the empty text box from database based on the value entered in the other text box. If more than one values exist then I have to show those values in dropdownlist. So now I have to replace the empty text box with the dropdown list and on the next postback have to keep the dropdownlist.
On hitting the button I loop through the datagrid items and remove the textbox control and add dropdownlist.
Now here how to rebind the datagrid, I tried to get all items in an array then work with array and rebind the datagrid to that array after all tasks but get the worst results than without rebinding, datagrid goes to default view with all empty textboxes...
I have an error pulling back the datakey from a datagrid. It's strange, because it works on the first page load, but when i try to pull it back after that, it fails. Here's a quick run down on my code....
in my datagrid item, I am specifying my key field as DataKeyField="ReqNo". The error is coming up in my paging event...
I actually found out what was going on.... I was trying to pull back the datakeys for an entry not in the current page... and it didn't like that. So I just moved things around and pulled the datakey from the current record in the current page...
I’m developing an application that will send a lot of data (up to one gigabyte) from a user to a company file server. One of the requirements of the solution is that the user doesn’t have to choose what file to send, all he has to do is press a button to start the upload. One solution is to create client- and server applications that use socket communication, but could a better choice be to create a web service that receives the data? In the future there could be added functionality to the server that e.g. sends statistics to the client, and it must be easier to add such a feature using a web service solution, right?
The best solution would be for the user to connect to a web page, be shown a button that says “start”, and when pressing it the correct files from his hard drive automatically gets uploaded to the server. But is that even possible to do, could it be done using some sort of ActiveX control that gets access to his hard drive?
I need all the advice I can get in deciding what solution to use.
how to refresh a image control to pick up the latest image file on a asp.net page. i am generating a image based on the input from the user and displaying it on the page through image control. The problem is that i am not able to get the latest image on the page, it keeps showing the old page. But when i hit the refresh button on the toolbar it correctly gets the latest image and displays it in the control. But that has another problem, it pops up a dialog asking user whether he wants to retry or cancel...
so in short i need to implement some logic so that the image control is refreshed when the image changes (i know exactly when the image changes) and dont popup any dialog box for user input.