|
Hi there...
I've been trying and trying to find a way to use an absolute URL to connect to a file X on server B from my ASP.NET program on server A in order to retrieve information regarding when file X was created and last modified. I'm using VB.Net.
I thought
Dim path As String = "http://www.someURL.ext/.../index.htm"
Dim fiNextBro As FileInfo = New FileInfo(path)
might work, but all I've gotten are errors saying that URI formats are not supported.
Could someone explain to me which methods in which class from the .Net library I need to use and how I can go about retrieving the file information I need please? This has me totally lost
|
|
|
|
|
May I know whether you want to read Web Page FileInfo or a file in LAN?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
I believe they are on the same LAN. They both show up in My Network Places.
|
|
|
|
|
If you have permissions you can check a file on a lan.
|
|
|
|
|
Hi,
I am trying to write a generic blog or guestbook kind control to use in my further projects. And in somewhere i need to read info from two different table adapters to use in a datalist control.
For convenience let me explain my environment:
In a Database I have two tables: Messages and Comments. Messages table contains the messages sent from the administrators and comments table contains the comments that is sent for the messages.
I have One DataSet that is responsible for these tables, which contains two table adapters for each table. one(adapter of the comments table) has an query that returns the number of comments for a message, and the other returns simply messages.
I want to list messages in a datalist control which has been binded to the Messages Tableadapter(no problem with this), and want to add an extra label which shows the number of comments related to this message.
But, there is no option to bind a control, inside the datalist, to another table adapter.
Is there any method to show data from another tableAdapter for datalist?
Thanks.
Ahmet Recep Navruz
|
|
|
|
|
You can use the ItemDataBound[^] event to set the number of comments for each message in the datalist control. Another option IMO is that you can have an additional column in the message table stored in the dataset, this column basically contains the message count and you can easily bind it to the label control.
|
|
|
|
|
Thanks for reply, this was really helpfull.
ItemDataBound resolved the problem.
For the second solution, i don't want to include comment number in the message table. So can we create a table on the fly which contains the the messages table and an additional column, comment_count. I mean what can be done in the Dataset so we can inherit the messages table and add an comment count column which's value evaluated by another SQL statement.
|
|
|
|
|
navruzahmet wrote: So can we create a table on the fly which contains the the messages table and an additional column, comment_count. I mean what can be done in the Dataset so we can inherit the messages table and add an comment count column which's value evaluated by another SQL statement.
That's also what I mean, you can add a new column to the current messages table and manually add the values for this column from executing another statement or you can manipulate the values from the second table in the dataset. In addition, you might also consider creating view or store procedure to populate the messages table with the comment count in one go.
|
|
|
|
|
Hello,
I am working on a form to edit some users information. As I have it right now, when the administrator is going to change a user's info, they first search the user to make sure it exists. The information appears on screen - or gives an error if the user doesn't exit - and the admin now presses the "Modify" button.
Here's my question: Is there a simple way that I could change the tags in which the information is shown to a drop down list? I know I can do it in the code behind using a string that contains the HTML code and then output it with Response.Write; but then my drop down list would lose all it's ASP.Net functionality.
I figure I could do it on the aspx file if I use a lot of conditionals to go around the HTML/ASP.Net code that I don't want; but I don't find this a clean way to do it.
Thanks in advance!
|
|
|
|
|
You can simply add two controls in the web page and depending on the context you can set the Visible property of the control accordingly to show/hide the control. Another option is that you can dynamically add the control (not the html markup) to the web page at runtime, but you should be aware of a couple of things when working with dynamic controls.
|
|
|
|
|
Hello,
Thanks for your reply! Even though I had thought of what you speak, it didn't sound "clean" to me. Yet, I recently found an article explaining exactly what I wanted to do. You can find them here:
Dynamic Controls in ASP.Net -> http://aspnet.4guysfromrolla.com/articles/081402-1.aspx
Working with Dynamically Created Controls -> http://aspnet.4guysfromrolla.com/articles/082102-1.aspx
Dynamic Web Controls, Postbacks and View State -> http://aspnet.4guysfromrolla.com/articles/092904-1.aspx
I hope this can help the community!
|
|
|
|
|
hi to all
SqlConnection con = new SqlConnection(connstring);
SqlCommand cmd = new SqlCommand("SELECT * FROM customers", con);
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
da.SelectCommand = cmd;
da.Fill(ds);
DataTable dt = ds.Tables[0];
return dt;
what is the purpose of using selectcommand(da.SelectCommand = cmd)
regards
saravanan
|
|
|
|
|
|
Hi,
I have a web page that displays a line graph. The control I was using under .Net 1.1 was WebChart from www.carlosag. When I migrated the site to .Net 2.0 the chart started to behave strangely in that all text was displayed as symbols. I thought maybe the chart was in some way not compatible so I downloaded ZedGraph and have discovered that I get the same behaviour. So it's obviously not a control specific problem. I reloaded the .Net Framework 2.0 last night but that didn't help. I'm developing under Windows 2k SP4 using Visual Web Developer Express. Any ideas? I'm getting desperate
thanks
mike
|
|
|
|
|
I have Dropdownlist and onSelectedIndex I want to fill another Dripdownlist ( ASP control ). How to implement the same. With HTML button control Javascript is possible but how about this? I do not have Ajax control.
|
|
|
|
|
|
Hi
I have to populate some datas from sql server database and display it directly in a CSV Format or CSV file. When i run the project it should provide me an option to whether open or save or cancel the file. when i click open it should be opened and be viewed in a excel sheet in CSV format and when i click save it should ask the destination folder and should be saved there in CSV format and when i click cancel it should be cancelled and the application should be closed. pls note that all these actions should happen in the same browser and should not be redirected to anyother page. Can anybody give me the detailed description and code in Asp.Net using C# .It's very Urgent.
Regards
Vijay.
|
|
|
|
|
VERY VERY URGENT -- Forgot to do your homework eh?
only two letters away from being an asset
|
|
|
|
|
Hi,
If u know answer me or else silently move to another question. pls dont post some funny messages like this;P
|
|
|
|
|
You're right, there is nothing funny about not being able to do your homework. Someday we may have to work together, or some one like you, and I'll have to waste my time teaching you what you should have learned in school.
only two letters away from being an asset
|
|
|
|
|
Dont act as if u r a smarthead and don't insult others as the same will happen to u when u r in some urgency. If u dont know the answer just shut up and get the hell out of my way.
|
|
|
|
|
Took you a while. Did you need help with that also?;P
only two letters away from being an asset
|
|
|
|
|
Well, you should know that "very (very) urgent" act as a filter and many simply do not want to help when those words are present because a) it is homework or b) the poster did nothing to investigate the topic himself first.
|
|
|
|
|
As opposed to just VERY URGENT?
|
|
|
|
|
Hi,
I'm looking for a tool that can be utilized by daily build to encode our assemblies.
It should prevent of decoding our code by disassemblers.
I need something like: http://www.smartassembly.com/product/how4.aspx
Is this the best we can have?
cyberjoe
|
|
|
|