I'm sure you can use bits of it but I'm not sure why you'd want to. You certainly can't (ar at the very least shouldn't) display a Windows Forms control on a web page.
I'm working on a small app that scrapes some HTML and parses out a few data items.
(specifically: I am trying to snag the 2 values for Total CPU Time (4:217:02:06:36) and Ranking (# 2,313) contined in the sniped below)
<br />
<tr bgcolor="#FFFFFF" onmouseover="javascript:style.background='#E5E5E5'" onmouseout="javascript:style.background='#FFFFFF'"><br />
<td>Total CPU Time (y:d:h:m:s) (Rank)</td><br />
<td nowrap="true">4:217:02:06:36(# 2,313)</td><br />
</tr><br />
Any suggestions on HOW? I am assuming that a RegExp might be the easiest, but I'm no wizard at creating those (i.e. any suggestions/help would be appreciated).
I want to make an automatic update system. Here is my simple plan for one:
At the begining of application init, the application will go into the updater block.
//////// Updater block psedo code
settings = Load application settings;
if (user wants auto updates)
{
//creat an instance of the updater from a library Updater.dll
Updater myUpdater = new Updater();
// updater goes online and check for updates
UpdaterFeedback = myUpdater.StartUpdater();
if (updaterfeedback == updatefound)
{
if (settings.totallyautomatic == true)
{
updater.doupdater
}
else
{
// ask user if they want to update & tell them about the update
// also give them some info on it
if (userWantsToUpdate == true)
{
updater.DoUpdate();
}
}
}
}
else
{
continue with the application startup
}
//////// End updater block
----------------------------
If you have any ideas, please post them
I have not a clue how to do the internet update check, if you have any ideas please post them.
well you could use the WebRequest classes to read a txt file from the net that has the latest version number for the app, and if not, downmload the new file. i cannot offer any more help on the matter, and next time, try thinking about it, istead of asking someone to write it for you, if you get stuck on a particular aspect of it, then we'll be more than happy to help.
Can some please explain how the "auto" paging option of the DataGrid web control is meant to work?
My datasource is a class derived from CollectionBase. Now the first page shows up fine, but when I click any other page number, nothing happens, the page does not display anything but the first page. The event gets fired as well, but that seems only of use when you want to do custom paging.
You still need to handle the event, even when it's automatic. All you actually need to do in that event handler is: DataGrid1.CurrentPageIndex = e.NewPageIndex but having to handle it yourself gives you the control to do other things.
For example, if you had an EditCommand column in the datagrid and someone hits edit on the fourth row, then pages to the next page, the EditItemIndex is still going to be set to 4, so you need to set it back to -1 in the PageIndexChanged event.
It was there in my datagrid but I thought that was just to pick up the information from the DataSet. You're right though, now I think back, you have to DataBind after setting the CurrentPageIndex, EditItemIndex or the SelectedItamIndex.
I don't understand why though and it can be very inconvenient.
I have played with NDoc a free open source doc generator for C#. However, it even though it does a good job a creating MSDN like, it is not 100% like the MSDN docs, the same with it's Java Doc output.
I was wondering if anyone knows of or has used other freeware/shareware/open source doc generators for C#. Since the only thing I can find is NDoc.
I played with an expensive commercial product that does a perfect and flawless job at generating MSDN looking docs and has a great interface. However it is very expensive for a single developer.
Now I do not know why .NET does not come with a built in tool like Java does. And the one in Visual Studio sucks big time, seems to have lots of bugs, or does not fully support all the .NET tags yet.
Anyways... thanks in advance for any input...
Aalst
Coding is a way of life. It's in the air we breath. It pumps through our vines. Without it we soon crumble to dust. - Rodney S. Foley
That was the first thing I tried. However, I do not know about you, but trying to figure out someone else code is bad enough, but trying to figure out code that is supported by 13 developers, that has little to no documentation is extremely difficult. It is not just one simple C# Project. It is divided into about a half dozen projects. A few classes have some documentation, however most of them do not.
The one little think I would like, is in there feature request tracker, they are just looking for someone to do it for them or one of the 13 developers to feel like doing it.
It would take a lot of my time just to get a basic handle on their code. So I though I try to save time and ask if there is anything else out their that is not commercial.
Aalst
Coding is a way of life. It's in the air we breath. It pumps through our vines. Without it we soon crumble to dust. - Rodney S. Foley
The one that I was refering to is DocumentX it from a UK company. It does a great job with a good interface. It costs about $385 USD for a single user license without a support subscribtion.
Aalst
Coding is a way of life. It's in the air we breath. It pumps through our vines. Without it we soon crumble to dust. - Rodney S. Foley
OK, so I have a good idea to start my first web project.
I feel dumb
I create the objects and then as soon as i leave the scope they are gone...null i mean. It's pretty much the same code I use in a windows application. What is so different that I'm not seeing?
leppie wrote: I feel dumb
Don't....it's not good for your self esteem!
Web sites are stateless. If you create an object at the page scope it is gone just as soon as you render the page. To keep it around you will need to either put it into session, put it into the page cache, or serialize it somewhere else and bring it back when needed.
If I'm going in the wrong direction, let me know, I'll see if I can help out. If you want me to look at some code...no prob!
Thanks,
ed
Every time I walk into a singles bar I can hear Mom's wise words: "Don't pick that up, you don't know where it's been!"
Ed K wrote: To keep it around you will need to either put it into session, put it into the page cache, or serialize it somewhere else and bring it back when needed.
I ended making the objects static, and placed them in the Global class, this seems to work fine...not sure if this OK, but things look like its working like it should. I'll play some more after some needed sleep.
Aalst wrote: error CS0019: Operator '|=' cannot be applied to operands of type 'bool' and 'int'error CS0019: Operator '|' cannot be applied to operands of type 'bool' and 'int'error CS0030: Cannot convert type 'int' to 'bool'error CS0030: Cannot convert type 'byte' to 'bool'error CS0030: Cannot convert type 'bool' to 'byte'
int | int //yes
byte | byte //yes
bool | bool //yes
(int)byte| int //yes