|
Excellent Article indeed! Appreciate the suggestion.
So data reader is the way to go unless it is absolutely necessary to use a dataset. On a tangent, this is also true for reading xml using the pull model in the framework with XML reader instead of loading the XMLDocument in memory.
I had also hoped that someone would put this scenario into multi-tier model for me, as I am still confused as where the separation is. For example, my aspx page will have the code-behind page - is this where I would type in my queries and interact woth my data-reader/dataset and process them or would I use pre-written classes(containing the logic for quering the data) and pre-defind methods like "get-product-by-id" etc., which I would instantiate in the code-behind page and pass the parameters to be processed withing those objects and return the results? Guess I am after "best-practices" here in designing a web-application that is scalable and reusable.
Furthermore, everyone of those objects (like dataset/datreader/adapter) are objects already, so is wrapping them necessary?
If someone can put this in perspective or suggest an article, I would appreciate it. Googling brought in results that are either too simplistic or too thoretical.
And Thanks Peter for taking the time to explain.
|
|
|
|
|
Hi buddies,
How to get the video srteaming details of an user from Flash communication server using C#?
is it possible???
it is very urgent...please help with a sample code or any article..
Thanks,
Vinu
|
|
|
|
|
Hi there,
I'm just wondering is there anyway possibly about windows control's events make happen in code? Not in Form..
As if it is user click button on form during the execution of code
Just like custom event make it happen ... or some other ways?
private void doSomething()
{
//Some code...
btnButton.Click(null,null);
}
|
|
|
|
|
Always you have a windows control's event you have a delegate function.
Try to call the delegate.
this.btnButton.Click += new System.EventHandler(this.btnButton_Click);
...
private void doSomething()
{
...
btnButton_Click(null, null);
...
}
Is that you want?
|
|
|
|
|
nope.. I already got solution..
btnButton.PerformClick()
Thanks anyway..
|
|
|
|
|
Hi
I wand to develop a tri state Check listed box (That allows tickboxs to be in three states: ticked, unticked and crossed.) for a win form application.
There is no such control in the .Net,
shall any one suggest how to do or shall I get any sample code for the same.
Regards
|
|
|
|
|
Given that you need to draw and store three states ( and it's a pretty simple control ), I'd be inclided to create an enum for the state and derive a control from the absolute base class, and handle all events and drawing myself. Then I'd be inclined to write a CP article when I was done
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
1.Ex: textbox1:dd/mm/yyyy
textbox2:dd/mm/yyyy.
Now, i want to compare these,such as i require users must type into textbox which the date in textbox2 is lager than the second one.
So how do i do? Please tell me.
2.
The textbox must formatted datetime type(dd/mm/yyyy), but users can type mm/yyyy or yyyy.Is there any way to do this in C#? If not how way to do that?
study, study and study more
|
|
|
|
|
Hi,
To compare the dates you can use DateTime class's Compare method.
To format the text box i guess the following link will help you.
http://www.developersdex.com/vb/message.asp?p=2927&r=4036244
Thanks and Reagrds
SGS
|
|
|
|
|
Why not use a datetimepicker, and then you can set the second one to have a minimum date of the value of the first one ? Then you also get a datetime without having to parse it, although parsing it is not that difficult. If you split the string on the slash and count the number of elements, you'll know which of the three formats your user has attempted. I always think it's better to use a control that stops the user from making a silly mistake, if possible.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I can't using DateTimePicker. I writing WebApplication not WindowApplication. Any way? Please help me!
study, study and study more
|
|
|
|
|
|
As well as the calendar web control, there are a number of javascript date time pickers around you could use.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have been reading about how you can write your server such that client calls can block at the server, thus awaiting something back (say, a heartbeat msg or some otehr kind of update message).
I am not an expert in threading, and I was wondering how this can be accomplished. I have a cserver that needs to pulse all connected clients with update messages that can be processed on the client's end. I am not able to purchase someone else's remoting framework that claims to be able to accomplish this when its something that can be accomplished for free with reasonably-skilled coding.
Please, any ideas would help me.
|
|
|
|
|
OK.
If its that simple (sending update information) you could use the following approach:
a) A website which has an XML-File with product information
Say: http://update.mycompany.com/autoupdate/products.xml
Contains: <product>
<name>ABC Tool
<version>1.2.3
<location>http://update.mycompany.com/autoupdate/ABCTool/setup_ABCTool_v123.exe
for each product.
Use WebRequest and WebResponse to retrieve that HTML-File, parse it, download (using Request and Response again) it, Process.Start() it.
Thats client initiated and will pass most NAT-Routers and Firewalls, as this uses HTTP. You may want to use HTTPRequest instead, try both, im not sure which one is the right choice.
Another approach:
Every client registers with the server on program start and unregisters on program termination. The Server stores that information in an arraylist and informs all clients on upgrades.
You can do that by calling the asynchronous methods for Socket.Send (BeginSend and EndSend, I believe) for each element of your array list.
Information on how to create client/server applications also is available in the MSDN Docs.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
hi all;
i got a serious problem; iam making network application and am tring to send udp messages from any node on internet to node in local lan who has access to internet through serial router. the problem is when i started to transmite messages i found that i recieves his messgaes but he can't. when i traced the program i found that his ip and port is diffrent than what i bounded it on. of course the ip is the external ip of lan to connect to internet but the surprise here is even port changed!!!!!!!. i can know from udp socket the ip and port of sender but i need to know before sending or recieving becouse there is main server who control all operations and sends those info between node to communicate.
so my question is how can i know virtual ip and port of node in local lan who deal through them to internet?
thx for your time.
marcoryos
|
|
|
|
|
I have a form where a user inputs into a few fields and I validate them for correct format ect..
I do a e.Cancel = true; in my Validating event.
I can put a e.Cancel = false; into my FormClosing event to get it to close with out prompting for correction in my fields.
my problem is that I can't get a "close" button to do the same as the close (top right X) on my form.
How do I set the "e.Close" to false or essentially the samt for my form in whole?
Thanks,
H
|
|
|
|
|
Hi hhrafn,
Do you want to close the form or not? Whats your requirement?
Thanks
SGS
|
|
|
|
|
I'd like the form to ignore the validation requirements and close the form. For now the e.cancel feature doesn't allow me to close a form via a close button.
I can only close by hitting the X in the top right corner. Probalby because there I can access the event that supports this cancel feature and I can set it to false.
|
|
|
|
|
Set the Button 's CausesValidation property to false .
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Cool!
Thanks!
works great
love the little simple solutions
|
|
|
|
|
Hi
I have un over problem. Wheni close the form with Top Right X it fire the validating event of the textbox.
Did you change any property of the form, that it don't fire this event
Help me please
|
|
|
|
|
There´s no way to know the database column max size (VARCHAR(20)<-- size) by the ADO.NET DataColumn or DataTable or Dataset information?
How can I prevent to write more chars than sql column let in a ADO .NET DataColumn of DataTable in for example DataGrid Control.
I Get the MaxLenth property in DataColumn but it has -1 value and the database column is Varchar(20) I want to get 20 not -1
I want to know if is possible get de real max size of text in DataColum that comes from database column with datatype varchar in .net not with sql querry.
Thank for your suggestion.
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
|
The "Decompilers!!!" post reminded me of something, and OK, I admit I'm lazy and haven't tried it--
What happens to an application that uses reflection when it's obfuscated? All those type names that are strings now refer to obfuscated classes and properties, don't they? So reflection breaks, I would think.
Anyone ever tried it?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|