.NET custom security: still possible?
Hi
I'm new to ASP.NET (from classic ASP) and wasn't aware of the Forms
Authentication security when I started working on a website. So I
built a login page that stores a CustomUser object in the Session, and
then I put a login check in the Master Page codebehind, Page_Load
event, which redirects to the Login.aspx if the login check fails.
I realise NOW that I should have gone th Forms Authentication (using
web.config) route, but I dont have the time to change this now - I
have to deliver the website today. I can come back later and change
this.
So FOR THE TIME BEING, how can I get my custom security system to
work?
The problem is, I have just put some code that uses the Sessions
CustomUser object - into the Page_Load event on one of my access-
restricted pages. But now I see that the Page_Load event of the
content page fires BEFORE the Master page login check. I tried moving
the login check to the Init event of the Master Page, but the content
page's Page_Load event still got executed.
So I guess what I'm asking is, how do I (and where do I) add code that
can check a Session object, and can then redirect the user WITHOUT
executing the rest of the Page_Load (or any other such events)?
Much appreciated.
Sean Tag: XML files Tag: 545796
Comparing Type variables
I have a questions regarding comparing types. Suppose I have the following
classes:
class class1
{
}
class derivedClass : class1
{
}
derivedClass myObject;
I now have a function that takes a Type as a parameter
bool TestType(object o, Type typeToTest)
{
// accomplish something like return (o is typeToTest)
return o is typeToTest; // This won't work because typeToTest is a
variable and not the actual type but I want to be able to check if o is
derived from the type supplied.
return o.GetType() == typeToTest; // This doesn't work either
because it only checks if the object is of the given type but not if it can
be casted to the given type.
}
bool result = TestType (myObject, typeof(class1));
Thanks
Jeronimo Tag: XML files Tag: 545795
Unbelievable experience with Honey hunting in Nepal
Honey Hunting is the real and frequent activity of indigenous Gurung
and
Magar Community in Bhujung and Pasgaon for honey hunting from which
they
are able to solve their problem of bread and butter. This ancestral
job of
honey hunting still continues in many remote villages of Nepal while
offering high tourism potential. A large section of travelers are
increasingly showing their interest in honey hunting thereby ensuring
staple sources of local revenue generation, besides Ghalegoan Bhujung
and
the hole of Annapurna region, Dhading and Jharlang across Ganesh Himal
Arun valley in Makalu and other trekking areas have become Popular for
honey hunting, a new tourist activity but in Nepal except Bhujung area
of
Annapurna region, special package of Honey hunting for tourist is not
developed yet. Nerveless, few lucky tourist get chance to observe
honey
hunting on spot while traveling along the trekking routes. There are
myriad be nests found in the inner and outer rings of different
trekking
areas which if professionally scientifically and technically managed,
provides an immense potentiality of promoting honey hunting as an add-
on
product.
This ancestral job of honey hunting still continues in many remote
villages of Nepal while offering high tourism potential.
Rath Nepal Tours and Travels organize this kind of Honey hunting Tour
With
part of Trekking. This is a camping Trek including Honey Hunting.Rath
Nepal Tours and Travels has well experience at Honey Hunters to do the
Job, you will enjoy the Trip. Come on our holiday and discover local
tradition and Goring culture in Nepal. Don't forget your camera!!
Trekking
in the foothills of the Annapurnas. See the spectacular honey hunting
on
the steep bee cliffs. Be welcomed by the Gurung people and learn about
their traditions and customs. These holidays give you the opportunity
to
sample traditions and culture. See them while you trek in the
foothills of
The Himalayas.
We have designed two itineraries with fixed departures dates to
provide
you an adventurous insight of the honey hunting in Nepal, please visit
.............
www.magical-nepal.com/nepal_honeyhunting.htm
Regards,
Rath Nepal Tours and Travels Pvt. Ltd
P.O Box 10691
2nd Floor, Mountain Plaza
Kantipath, Kathmandu, Nepal.
TEL: 977 1 4268948, 4258141, 4261512
FAX: 977 1 4264512
Email: rathnepal@gmail.com, sales@magical-nepal.com
Website: www.magical-nepal.com Tag: XML files Tag: 545792
Are you ready for ultimate challenge?
Rath Nepal invites you for ultimate challenge during your vacation.
The Everest Marathon is a 30 days holiday in Nepal organised by Rath
Nepal
Tours and Travel Pvt.Ltd, combining sightseeing in the Kathmandu,
Chitwan
and a day River Raft in Trisuli River, a hard trek to the Everest
region,
an ascent of Kala Pattar for the best views of Everest, and one of the
most grueling races in the world.
The race starts at Gorak Shep (5184m), just below Everest base camp,
and
finishes in the Sherpa 'capital' of Namche Bazaar (3446m). The course
is a
measured 26.2 miles/42 km and, although it is basically downhill, the
trail undulates and there are two steep uphill sections. The race
starts
at 7 am and there are cut-off points at Tengboche monastery (14 miles
-
12.45 pm) and Chorkhung (20 miles - 2.45 pm), just above Namche
Bazaar.
The last 6 miles, out to Thamo and back, are on an exhausting
undulating
trail. It is essential to finish by nightfall at 6.00 pm.
If you are ready for this ultimate challenge visit......
http://www.magical-nepal.com/nepal_marathon.htm
Regards,
Rath Nepal Tours and Travels Pvt. Ltd
P.O Box 10691
2nd Floor, Mountain Plaza
Kantipath, Kathmandu, Nepal.
TEL: 977 1 4268948, 4258141, 4261512
FAX: 977 1 4264512
Email: rathnepal@gmail.com, sales@magical-nepal.com
Website: www.magical-nepal.com Tag: XML files Tag: 545791
Queuing Up Threads - Thread Works Until Needing Resource From Other
Hello:
At work we have run into an interesting "need". We have a bunch of
customers whose calculations affect one another. Now, to this time, we
have never and we may never have a scenario where two customers affect
one another. So, right now, our system can handle A affecting B.
However, we may someday need to handle A affects B and B affects A. Of
course, neither need to be totally calculated for the other to run.
Ideally, it would be nice to have a list or queue of customers, each
calculating in a different thread. At some deterministic point in a
customer's calculation, we would check to see if they are affected. It
would be nice to tell the thread to simply STOP. We could simply place
the paused thread at the back of the queue. Whenever its turn came
around again, it would be "guarunteed" that it could progress, so we
just unpause it.
In the current system we have to do a long, slow SQL to order
customers. However, this ordering doesn't handle inner-dependencies. I
would like to try to replace the slow SQL with this method, gaining
the benefit of solving the inner-dependency issue at the same time.
The only negative of doing things this way is the memory sitting
around in the inactive, partially completed thread. However, due to
some refactoring, my code only generates a very small memory footprint
until later in the calculation. Also, the number of inner-dependencies
will be small, so that isn't an issue (today).
How can I achieve my goal? Is there a way of doing this without
identifying the affecting customer? I just want to keep it simple by
putting the paused thread after all other threads. if it's not that
simple, let me know.
Thanks,
Travis Tag: XML files Tag: 545789
Windows Mobile - C# Express possible?
Windows Mobile - C# Express possible?
John Kennedy's blog [URL: http://blogs.msdn.com/johnkenn/ ] seemed to
hint that Windows Mobile software development was capable with C#
Express.
However, when viewing [URL: http://msdn2.microsoft.com/en-
us/library/bb158496.aspx ], it appears that only Visual Studio
Standard and above will work.
Being unfamiliar with compatibility issues, is it even possible with
Visual C# Express 2005+?
I would have just checked by installing, but my laptop is super old
and subsequently slow -- so it would have taken me hours and hours to
install (I figured it would install), and then run into errors (when
compiling or referencing assemblies).
Thanks for your time and patience!
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not. Tag: XML files Tag: 545786
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WRJ Replica
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WRJ Replica,
Fake, Cheap, AAA Replica watch
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WRJ Link :
http://www.aaa-replica-watch.com/Rolex_Ladies_Watch_179174WRJ.html
Buy the cheapest Rolex Oyster Perpetual Lady Datejust Ladies Watch
179174-WRJ in toppest Replica . www.aaa-replica-watch.com helps you to
save money! Rolex-Ladies-Watch-179174WRJ , Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-WRJ , Replia , Cheap , Fake , imitation ,
Rolex Watches
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WRJ
Information :
Brand : Rolex Watches (http://www.aaa-replica-watch.com/
Replica_Rolex.html )
Gender : Ladies
Model : Rolex-Ladies-Watch-179174WRJ
Case Material : Stainless Steel
Case Diameter :
Dial Color : White
Bezel : 18kt White Gold
Movement : 31 Jewel Chronometer Automatic
Clasp : Stainless Steel
Water Resistant : 30m/100ft
Crystal : Synthetic Sapphire
Our Price : $ 183.00
Stainless steel case and bracelet. White dial. Date displays at 3
o'clock position. 18kt white gold bezel. Synthetic sapphire crystal.
Hidden deployment clasp. Case diameter 26mm. 31 jewel chronometer
automatic movement. Water resistant at 30 meters (100 feet).
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WRJ Replica,
With the mix of finest craftsmanship and contemporary styling, not
only does it reflect the time but also care you put into looking good.
choose one to promote your quality and make yourself impressive among
people
Thank you for choosing www.aaa-replica-watch.com as your reliable
dealer of quality waches including Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-WRJ . we guarantee every watch you
receive will be exact watch you ordered. Each watch sold enjoy one
year Warranty for free repair. Every order from aaa-replica-watches is
shipped via EMS, the customer is responsible for the shipping fee on
the first order, but since the second watch you buy from our site, the
shipping cost is free. Please note that If the total amount of payment
is over $600(USD), the customer is required to contact our customer
service before sending the money in case failed payment. If you have
any other questions please check our other pages or feel free to email
us by service@aaa-replica-watch.com.
The Same Rolex Watches Series :
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SDJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-MRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174MRJ.html
Rolex Oyster Perpetual Submariner Date Mens Watch 16613-BLSO :
http://www.aaa-replica.com/Rolex_Mens_Watch_16613BLSO.html
Rolex Oyster Perpetual Submariner Date Mens Watch 16613-GYDO :
http://www.aaa-replica.com/Rolex_Mens_Watch_16613GYDO.html
Rolex Oyster Perpetual Submariner Steel Mens Watch 14060M :
http://www.aaa-replica.com/Rolex_14060M.html
Rolex Oyster Perpetual Submariner Date 18kt Gold Mens Watch 16618B :
http://www.aaa-replica.com/Rolex_16618B.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-SRO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200SRO.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-SAO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200SAO.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-PRO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200PRO.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-BLSO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200BLSO.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-BLRO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200BLRO.html
Rolex Oyster Perpetual Datejust Mens Watch 116200-BKSO :
http://www.aaa-replica.com/Rolex_Mens_Watch_116200BKSO.html Tag: XML files Tag: 545782
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WDJ Replica
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WDJ Replica,
Fake, Cheap, AAA Replica watch
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WDJ Link :
http://www.aaa-replica-watch.com/Rolex_Ladies_Watch_179174WDJ.html
Buy the cheapest Rolex Oyster Perpetual Lady Datejust Ladies Watch
179174-WDJ in toppest Replica . www.aaa-replica-watch.com helps you to
save money! Rolex-Ladies-Watch-179174WDJ , Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-WDJ , Replia , Cheap , Fake , imitation ,
Rolex Watches
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WDJ
Information :
Brand : Rolex Watches (http://www.aaa-replica-watch.com/
Replica_Rolex.html )
Gender : Ladies
Model : Rolex-Ladies-Watch-179174WDJ
Case Material : Stainless Steel
Case Diameter :
Dial Color : White With 10 Diamonds
Bezel : 18kt White Gold
Movement : 31 Jewel Chronometer Automatic
Clasp : Stainless Steel
Water Resistant : 30m/100ft
Crystal : Synthetic Sapphire
Our Price : $ 175.00
Stainless steel case and bracelet. White dial with 10 diamond hour
markers. Date displays at 3 o'clock position. 18kt white gold bezel.
Synthetic sapphire crystal. Hidden deployment clasp. Case diameter
26mm. 31 jewel chronometer automatic movement. Water resistant at 30
meters (100 feet).
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-WDJ Replica,
With the mix of finest craftsmanship and contemporary styling, not
only does it reflect the time but also care you put into looking good.
choose one to promote your quality and make yourself impressive among
people
Thank you for choosing www.aaa-replica-watch.com as your reliable
dealer of quality waches including Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-WDJ . we guarantee every watch you
receive will be exact watch you ordered. Each watch sold enjoy one
year Warranty for free repair. Every order from aaa-replica-watches is
shipped via EMS, the customer is responsible for the shipping fee on
the first order, but since the second watch you buy from our site, the
shipping cost is free. Please note that If the total amount of payment
is over $600(USD), the customer is required to contact our customer
service before sending the money in case failed payment. If you have
any other questions please check our other pages or feel free to email
us by service@aaa-replica-watch.com.
The Same Rolex Watches Series :
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SRJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-PSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174PSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-PDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174PDJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-MAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174MAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLDJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKSKRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKSBRJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKRJ.html Tag: XML files Tag: 545781
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ Replica
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ Replica,
Fake, Cheap, AAA Replica watch
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ Link :
http://www.aaa-replica-watch.com/Rolex_Ladies_Watch_179174SSJ.html
Buy the cheapest Rolex Oyster Perpetual Lady Datejust Ladies Watch
179174-SSJ in toppest Replica . www.aaa-replica-watch.com helps you to
save money! Rolex-Ladies-Watch-179174SSJ , Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-SSJ , Replia , Cheap , Fake , imitation ,
Rolex Watches
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ
Information :
Brand : Rolex Watches (http://www.aaa-replica-watch.com/
Replica_Rolex.html )
Gender : Ladies
Model : Rolex-Ladies-Watch-179174SSJ
Case Material : Stainless Steel
Case Diameter :
Dial Color : Silver
Bezel : 18kt White Gold
Movement : 31 Jewel Chronometer Automatic
Clasp : Stainless Steel
Water Resistant : 30m/100ft
Crystal : Synthetic Sapphire
Our Price : $ 175.00
Stainless steel case and bracelet. Silver dial. Date displays at 3
o'clock position. 18kt white gold bezel. Synthetic sapphire crystal.
Hidden deployment clasp. Case diameter 26mm. 31 jewel chronometer
automatic movement. Water resistant at 30 meters (100 feet).
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SSJ Replica,
With the mix of finest craftsmanship and contemporary styling, not
only does it reflect the time but also care you put into looking good.
choose one to promote your quality and make yourself impressive among
people
Thank you for choosing www.aaa-replica-watch.com as your reliable
dealer of quality waches including Rolex Oyster Perpetual Lady
Datejust Ladies Watch 179174-SSJ . we guarantee every watch you
receive will be exact watch you ordered. Each watch sold enjoy one
year Warranty for free repair. Every order from aaa-replica-watches is
shipped via EMS, the customer is responsible for the shipping fee on
the first order, but since the second watch you buy from our site, the
shipping cost is free. Please note that If the total amount of payment
is over $600(USD), the customer is required to contact our customer
service before sending the money in case failed payment. If you have
any other questions please check our other pages or feel free to email
us by service@aaa-replica-watch.com.
The Same Rolex Watches Series :
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SRJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-SAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174SAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-PSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174PSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-PDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174PDJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-MAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174MAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLDJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BLAJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BLAJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKSJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKSJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKSKRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKSBRJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKRJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKRJ.html
Rolex Oyster Perpetual Lady Datejust Ladies Watch 179174-BKDJ :
http://www.aaa-replica.com/Rolex_Ladies_Watch_179174BKDJ.html Tag: XML files Tag: 545780
Bulk UPDATE in LINQ for SQL
Is it possible to create following query in LINQ for SQL
UPDATE Employee SET Salary= Salary * 1.5 WHERE Employee.Job='Developer'
(Don't you like this query :-)?)
Thanks,
Shimon. Tag: XML files Tag: 545779
What is the least impactful way (to the end user) to deploy a
Hi all,
I'm making an app that reads some text files on the user's computer,
puts them into a little database, and then least the user view/search
thru them. I've just realized that the sqlexpress db I created thru
server explorer is only gonna be on my dev box, and not the user's
(heh). So I need to write code that'll create a similar db on the
user's computer.
From the end user's standpoint, what's the easiest way to do this? As
much as possible, I'd like this to be completely transparent to the
user.
Thanks for any ideas! Tag: XML files Tag: 545760
Show dialog in response to message
Disclaimer: I'm new at C# so please be gentle. :-)
I'm writing a simple card game where two players play against each
other through a middle hand they both connect to. In the client (the
player) I read messages from the middle hand in an asynchronous
fashion. I ran into a problem when I tried to implement the player
repsone to the play card message and I need your help.
When the player gets the play card message I want to display a simple
dialog box displaying the cards he or she has available for play.
However, during runtime I get an InvalidOperationException when I
attempt to show the dialog. The more precise error message is, and
here I translate to english: The action between threads is not valid.
The control collected/gathered from another thread than the one it was
created on. Is it because the control (the dialog) tries to use an
object, created by the "main" form, holding the players cards? How
should I solve this in a proper way?
Thanks for reading and thanks for any replies!
- Eric Tag: XML files Tag: 545759
New usb drive created
Hi All
I am trying to capture when new USB disk has been inserted in c#
windows form. i tried using the ManagementEventWatcher but unable to
find a event when a usb device has deen installed and has a drive
letter associated with it.
I wonder if you guy could help me, this is what i am try to do:
When usb is inserted, a messagebox is displayed saying that would u
like to load the data (works fine but if the usb is inserted first
time it stuffs up, event occurs and no usb found dialog is displayed.
no usb found dialog is displayed because of the fact that windows
start installing drivers for it)
any help/suggestion would be appreciated
thanks alot
sunny Tag: XML files Tag: 545757
using OPTIONAL third party assembly
I have a 3rd party tool I'd like my application (an ASP.NET/C# app) to
use, but I don't want it to be *required* by the app. At the same
time, I want to take advantage of Visual Studio's great .NET
programming environment... how do I set this up so that I can easily
use the objects from the 3rd party assembly, but not have the app blow
up when it's not present?
If I add a reference to the web app, I get a web.config assembly entry
for it. Not good, because then it has to be there or ASP.NET throws a
fit. If I don't add the reference, the compiler doesn't know anything
about the object and I can't write code against it.
The best we've come up with so far is to have a completely different
class library project/solution which contains the reference to the
assembly (and the code which uses it)... and then load that
dynamically in our app. This is a bit of a pain though and obfuscates
what is really going on... I'd like to get everything in one solution.
Seems like there ought to be some really simple solution to this... ? Tag: XML files Tag: 545756
Dynamically calling a TableAdapter's Update method
Because there is no TableAdapter base class (The designer creates
TableAdapaters as classes which are derived from
global::System.ComponentModel.Component) I need a way to call the Update
method of a series of TableAdapters that are stored in a collection. The
problem is in order to store TableAdapters in a collection I had to cast
them as Components, but when I retrieve them, obviously they don't have an
update method because the Component class has no Update method:
foreach(Component tableAdapt in TableAdapterCollection)
{
tableAdapt.Update(...); <----- This can't happen because the items
stored in the collection are type of Components and can't cast them to
TableAdapters
}
I am really in need of a way to do this...even if it is "creative" :-)
Thanks!
Ron Tag: XML files Tag: 545745
How can I determine if a Windows Driver is Digitally signed
Hey all.
I need to determine whether or not a Windows Driver is digitally
signed using a C# application. Can anyone point me in the right
direction for doing this? I know it has something to do with the .cat
file, but I'm not sure exactly what else I need to do.
TIA! Tag: XML files Tag: 545735
This actually works.
I couldn't believe it. Screw programming anymore!
I'm totally serious. This actually works!
It is SO EASY to make money this way. Anyone, and I mean ANYONE can do
it.
You should start seeing returns within a day or two.
Do yourself a favour and at least check it out:
http://agentb.affstocks.hop.clickbank.net/ Tag: XML files Tag: 545733
how to save my class in settings
I'm trying to use the settings class of my C# project to save an ArrayList
of my class SyncSystem. I have added the ArrayList using the settings
dialog with user scope. What happens is that when I save the settings,
everything works great. But when I close the application then start it up
again, the saved data is no longer there, the ArrayList is null. I check
this by adding this to fMain:
if (SFS.Properties.Settings.Default.SyncSystems == null)
{
MessageBox.Show("null");
SFS.Properties.Settings.Default.SyncSystems = new
System.Collections.ArrayList();
}
What am I doing wrong? Is my class not serializable? An ArrayList is
serializable, right?
here is the save code:
SyncSystem ss = new SyncSystem();
ss.name = tbName.Text;
ss.source = comboDir.Text;
ss.destination = comboDir.Text;
ss.recurse = chkRecurse.Checked;
ss.mode = SyncSystem.syncMode.echo;
SFS.Properties.Settings.Default.SyncSystems.Add(ss);
SFS.Properties.Settings.Default.Save(); // doesnt save
after program closed
foreach (SyncSystem s in
SFS.Properties.Settings.Default.SyncSystems)
MessageBox.Show(s.name);
here is the class:
public class SyncSystem
{
public enum syncMode
{
echo,
equalize,
mirror
}
private string _name;
private string _source;
private string _destination;
private syncMode _mode;
private bool _recurse;
public SyncSystem()
{
_name = "";
_source = "";
_destination = "";
_recurse = false;
_mode = syncMode.mirror;
}
public SyncSystem(string name,
string source,
string destination,
bool recurse,
syncMode mode)
{
_name = name;
_source = source;
_destination = destination;
_recurse = recurse;
_mode = mode;
}
public string name
{
get{ return _name; }
set{ _name = value; }
}
public string source
{
get { return _source; }
set { _source = value; }
}
public string destination
{
get { return _destination; }
set { _destination = value; }
}
public bool recurse
{
get { return _recurse; }
set { _recurse = value; }
}
public syncMode mode
{
get { return _mode; }
set { _mode = value; }
}
} Tag: XML files Tag: 545727
Calling a VB.NET DLL from C#
I have created a simple VB.NET DLL. I want to test it using C# by calling
its only function and getting back the result. The function within the DLL
is:
Public Function ADD(ByVal first As Integer, ByVal sec As Integer)
Dim abc As Integer
abc = first + sec
Return abc
End Function
I compiled the DLL and then opened up VS2008 and started a C# project. I
added a reference to the DLL.
I know nothing about C#. My question is what else do I need to do in order
to be able to call this function, this DLL, from C#. Do I need to add a
"using" statement? What code statement would I use to call the function? Do
I need to declare the function within the DLL somewhere? If so, how?
Thanks for any insight!
JW Tag: XML files Tag: 545720
MDF to MDB
=DD have an mdf file with size of 11 gb. But i cannot attach mdf file
to
Sql server. beacuse my licence is limited on 4.096 mb. =DDs tthere a
way
to attach db? is tthere any tool to convert mdf file to mdb? so i can
delete some records on it and then try to attach again?
Best Regards
Hakan Fatih YILDIRIM Tag: XML files Tag: 545716
Overriding the onclick of a process
I have created a c# application where I have successfully created a
System.Diagnostics.Process and set the parent to be a GUI Control so
the process is embedded in the panel and looks like part of my
software application.
I would like to be able to have a smaller version of the process shown
and click on it and have it bring up the full-screen. I have the
process so it can be shown and when a button is clicked, resized to
fullscreen, but whenever the process itself is clicked on, the process
is activated and the system tries to go in and use the process.
To overcome this, I have tried to deactivate the control (which works,
now clicking on the external software process does nothing), but I
can't overwrite the onClick command.
I tried to put a blank panel on top of the panel including the process
in order to catch the onClick event there, but regardless of my
efforts to BringToFront or SendToBack the process (change the z-
order), it does not display on top and clicking only clicks on the
external process.
Does anyone have any ideas for how I could achieve this effect so that
when it isn't full screen, clicking on it would make it full screen,
and the process would be active and behave as it currently does only
when it is full-sized?
Thanks! Tag: XML files Tag: 545714
inline copies of enums
Is it possible to make an inline copy in CSharp? I want to maintain a
single enumeration but make a copy of the members in a separate
enumeration.
I have an enumeration defined in a certain namespace:
namespace Graphing.Core
{
public enum EnumColors
{
Red = 1,
...
}
}
For organisational purposes I would like to introduce a separate
namespace that includes all the types that are intended for
interoperability. In this namespace I need a "mirror" of my original
enumeration but with a different name (to maintain our tlb naming
conventions). The enumeration members are exactly the same:
namespace GraphingInterop.Core
{
[System.Runtime.InteropServices.ComVisible(true)]
public enum EnumGraphColors
{
Red = 1,
...
}
}
I can not find any means in the language to achieve this unless we
maintain two copies of the enumeration. Does anybody have any
suggestions? Tag: XML files Tag: 545712
testing my project
hey all,
can someone please tell me if this is possible and what the best way of
doing it is; on my aspx page i'd like to have 2 buttons and depending on
which one was clicked i'd like to go and modify the web config file for the
app and change the initial catalog appropriately.
is this possible and what would be the best way?
thanks,
rodchar Tag: XML files Tag: 545710
NotSupportedException on Windows Mobile Device ...
Hi Everyone,
I am writing a simple application to start with Windows Mobile 6. Though, I
have developed many applications on .NET Framework 1.1, but this is the
first time I am working on Compact Framework.
I have tried to write an application, that creates a simple form with 2
buttons on that, "Hide" and "Unload". I built the application well and
copied it to the device. The application was build using FW 3.5 and before
running the application on the device, I installed .NET CF 3.5
(NETCFv35.wm.armv4i.cab) on the device and rebooted it.
When I run the application, it fails during the execution of method
"InitializeComponent()". The error is below:
SmartDeviceApplication1.exe
NotSupportedException
at
Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)
at
System.Windows.Forms.Controls._InitInstance(WNT wnt, UInt32 dwStyle)
at
System.Windows.Forms.Control..ctr(WNT wnt)
at
System.Windows.Forms.Button..ctr()
at
SmartDeviceApplication1.Form1.InitializeComponent()
at
SmartDeviceApplication1.Form1..ctor()
at
SmartDeviceApplication1.Form1.Program.Main()
I have only set the text property of the buttons, no tricky code, no
functionality ...
I am not clear what is not supported, The button control or the Framework ?
OR is it a symptom of some other problem.
Not that this application works well on the Classic device Emulator.
Can some one knows about it ?
Thanks,
*(Vipul)() ; Tag: XML files Tag: 545703
Datasets and Excel
Hi,
I'm using oledbconnection to retreive the records from excel. Here are
the steps that i'm currently following.
DataTable dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
null);
if (dt == null)
return null;
string[] excelSheets= new string[dt.Rows.Count ];
int i=0;
foreach (DataRow row in dt.Rows)
{
excelSheets[i] = row["TABLE_NAME"].ToString();
cmd= new OleDbCommand();
cmd.CommandText ="select * from [" +
excelSheets[i] + "]";
dbDataAdp = new OleDbDataAdapter(cmd.CommandText ,
conn);
DataTable dtNew = new DataTable(excelSheets[i]);
dbDataAdp.Fill(dtNew);
ds.Tables.Add(dtNew);
i++;
}
I might have a situation where in there will be 1000 sheets and each
sheet might have 65000 records. Can you please let me know the best
practices that i can follow making sure that memory and performance
issues can be taken care of ?
Any help or reference is highly appreciated.
Thank you,
Ratnakar. Tag: XML files Tag: 545702
"Importing" my existing classes to a dbml?
Hi,
I'm currently moving (slowly) to use Linq to Sql to replace my custom
data access layer. Fortunately, my DAL worked very similar to L2S as
far as the use of classes goes; each table is decorated with
attributes that tell my DAL how to do what it needs.
At first glance, it seemed all I had to do was slap the Table and
Column attributes onto my classes, and I could use both Linq and my
DAL as I transition.
I'm now at the point where I'm creating associations and going to be
using Linq to update data, not just read it. I hit a problem, which I
think was caused because my backing field for the ONE side of a
relationship was MyTable, not EntityRef<MyTable>. Ok, I can fix that,
I've only done a few classes. Now I'm looking at the EntitySet side
of things. Here it seems more complex; initially I had simply the
field for EntitySet<MyTable2>. But it looks like other code is could
be needed, such as specifying actions for insert and delete and
implementing IPropertyChanging and IPropertyChanged.
So.. is there any way to automate getting this code in? Do my data
access classes HAVE to be in the Dbml.designer.cs file, all in the
same namespace?
What are my options here? Tag: XML files Tag: 545685
PropertyGrid
Hi,
When I use the propertygrid to display boolean value property, le
choice is always "true or false", in english.
Is it possible to modify it to strings for used culture ?
For exemple, "vrai ou faux" in french ...
Thanks,
J-L Tag: XML files Tag: 545683
Question, old programming books for beginnner okay?
Hi, I have a couple of csharp books for beginners that I never used. They
were published around the 1.0 framework era. Would I be doing a friend a
disservice by giving him these books? ie. should he buy more recently
published books instead or will the ones I have be okay.
I would hate for him to use these books and then feel like he's having to
relearn 3.0 framework code. I'm not a programmer myself so I really don't
know how much is changed or whatever. I heard was they included more
namespaces and chagned some syntax? I'm hoping that since they're beginner
books, most of the code samples and training will not be dramatically
affected by newer framework versions.
Thanks a lot.
p.s. oh, if you don't recommend using the old books please recommend new
ones.
Books are
Learning C# - Jesse Liberty
C# By Dissection - Ira Pohl Tag: XML files Tag: 545675
EventWaitHandle.OpenExisting oddity
I have an application (lets call it app_1) that creates a named event
using the EventWaitHandle class and friends. I use it to determine
from other external apps if app_1 is still running. I do it by
performing an EventWaitHandle.OpenExisting on the said named event.
The problem is even after app_1 is shut down (the named event is
properly closed before app_1 exits) doing EventWaitHandle.OpenExisting
from other external applications still succeeds! This is a problem
for me because now I can no longer rely on the absence of the event to
tell me if app_1 is running or not.
Why is the event still hanging around? I know there are other ways to
detect if a process is running or not but I want to know why this
won't work. Tag: XML files Tag: 545674
How to trap error that invokes the Send Error Report To Microsoft?
Hi,
My C# application trys to access directorycontext during Form loading. Try
and Catch if there is an exception. I then output an error message and then
"this.Close();" to exit the application. But, as my applicaiton closes, the
MS dialog comes up asking to send Error Report to MS.
I tried using ThreadException event code from:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.application.threadexception.aspx
But I'm getting compiling message:
The name ErrorhandlerFrom does not exist in the current context.
This is from the line of code:
// Add the event handler for handling UI thread exceptions to the event.
Application.ThreadException += new
ThreadExceptionEventHandler(ErrorHandlerForm.Form1_UIThreadException);
How to address that? What is ErrorHandlerForm?
I can't find answer to the ErrorHandlerForm so I tried commenting that line
out and I put a try catch around my code(including Application.Run) in
program.cs. Now the MS Error Report dialog does't come up. Why is that so?
And also, is it OK to put a try-catch around Application.Run? Thank you.
--
Thanks. Tag: XML files Tag: 545671
defining objects with xml/schema
This is more of wanting to get some opinions and if anyone has run into the
same design issue.
I need to have about a hundred c# classes that simply represent an object
and contain data (no methods). These objects will be modified pretty often
by alot of different people and need to be serialized/deserialized to binary
and xml.
I basically have three options:
1. write the classes in c#
2. represent the classes in xml and auto-generate them
3. represent the classes in xsd and auto-generate them
option 1 can be done but gets very reptitive and messy when there are many
sub-objects.
option 2 gives a very clear representation of the object and is easy for
other people to modify/add new fields, however does not contain enough data
to distinguish the types that are generated (data type, array, etc.).
option 3 does the job but is so hard to visualize and maintain/modify and
will be hard for other people who don't have a grasp of xsd schema. plus xsd
schema is really to represent xml and not a programmable object.
I was thinking of representing my object with a hybrid of xml and xsd and
having a custom generator like xsd.exe create the c# objects. an object
could look like this...
<myobject>
<item1>xs:type=boolean</item1>
<item2 myattr1="xs:type=dateTime">xs:type=string</item2>
<item3>
<item4 xs:array>xs:type=mytype</item4>
</item3>
something like that...of course "xs:" could be something different but
indicates a code generator option. it would produce somethig like...
class myobject
{
public bool item1 {get; set;}
public item2Object {get;set;}
public item3Object {get;set;}
public class item2Object
{
[XmlAttribute]
public bool myattr1 {get; set;}
[XmlText]
public string Value {get;set;}
}
public class item3Object
{
public List<mytype> item4 {get; set;}
}
}
I think that would give a good flexible way of generating objects that could
be easily maintained and easily compared for backward compatibility problems.
any thoughts? Tag: XML files Tag: 545665
MDF file
=DD have an mdf file with size of 11 gb. But i cannot attach mdf file to
Sql server. beacuse my licence is limited on 4.096 mb. =DDs tthere a way
to attach db? is tthere any tool to convert mdf file to mdb? so i can
delete some records on it and then try to attach again?
Best Regards
Hakan Fatih YILDIRIM Tag: XML files Tag: 545653
Little beginner's query
I have successfully created a small application that uses arraylists
of objects. However I have found it quite tiresome , when modifying
one of the objects in the arraylist to have to assign it to a
temporary instance before re-writing it.
something like...
temp_object1 = (object1) object1_arraylist[10]
temp_object1.element = "Something else"
object1_arraylist[10] = temp_object1
because it seems impossible to simply code:
(object1_arraylist[10]).element = "Something else"
Is there a simple way round this? Would pointers help?
Thanks for the tip!
steve tanner Tag: XML files Tag: 545651
ms sec fix caused SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
I've got code that's been working for years.
This is running on Win2003 Server whiled logged in as the admin.
When the MS sec fixes were installed last night, this code now fails with:
System.Net.Sockets.SocketException: An attempt was made to access a socket in a
way forbidden by its access permissions
IDictionary props = new Hashtable();
props["name"] = "tcp";
props["port"] = 1234;
props["rejectRemoteRequests"] = "true";
props["bindTo"]= "127.0.0.1";
BinaryServerFormatterSinkProvider srv = new BinaryServerFormatterSinkProvider();
TcpServerChannel chnl = new TcpServerChannel(props,srv);
ChannelServices.RegisterChannel(chnl, false); // fails at this point
How can I resolve this?
--
Thanks in advance, Les Caudle Tag: XML files Tag: 545648
How to add a COM user control to a form
Hi,
I have a COM dll written in C#, I compiled it from its source as .Net2
in VS2008.
It is a User control derived from System.Windows.Forms.UserControl
I compile it as a class library, with COM Interop, VS2008 creates
beutifully dll and tlb for that.
To be able to "run", test an ddebug it: I added a Windows Form
Project, which will "call" this usercontrol under the same solution.
(Just by Add, New Project, Windows Forms Application. The IDE created
a beautiful empty form.). I added a project reference to the COM
control above (IDE has not allowed to add it as a COM reference.)
How do I add, (or embed) the earlier COM user control into that
beutiful empty Form1?
And: How do I handle in the Form1 the COM ButtonClicked() event,
which is an
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IContainerEvents
Any hints appreciated.
Thanks,
Janos Tag: XML files Tag: 545647
Importing forms from vs2005 > vs2008 manually. How do i make vs2008 recognise them as forms?
Im moving an application from VS2005 to VS2008.
Im recreating my projects manually as I've had problems in the past allowing
VS to update my application automatically
I copy the xxx.cs, xxx.designer.cs and xxx.resx files for a form to the new
project directory.
I only add the .cs file to the project and VS2008 automatically picks up the
other 2 files and places them in subnodes in the solution explorer. But, the
icon shown in solution explorer is that for a class/code file and when I
double click on it I dont get my form shown. I only see the code in the cs
file.
If I add all 3 files to the project then a base node is created for each of
the 3 files.
How do I add a form properly please? Tag: XML files Tag: 545639
java.lang query
What references in a C# .NET project are needed to include java.lang
I would like to make java.lang.System.getProperty(..) calls,
thanks, Tag: XML files Tag: 545637
datagrid values
All,
having a few problems with accessing a value from a datagrid.
private void Grid1_AfterRowUpdate(object sender,
Infragistics.Win.UltraWinGrid.RowEventArgs e)
{
string strValueName =
this.Grid1.DisplayLayout.Bands[0].Columns[0].ToString();
...
This basically pulls back the column name but not the value from the
row.
anyone know where to start looking or point me in the right direction
to get:
strValueName = Row value
Cheers,
dave Tag: XML files Tag: 545634
Using Reflection on FieldInfo
I have a windows form that uses several typed datasets which generates the
usual Designer code. I need to reference these objects elsewhere in my
code. I was successful (partially) in using reflection and field info:
System.Reflection.FieldInfo[] fi =
this.GetType().GetFields(System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Public);
for (int i = 0; i < fi.Length; i++)
{
System.Diagnostics.Debug.WriteLine(string.Format("{0}",
fi[i].FieldType));
}
This allows me to see each of the objects on the form which is good. My
question specifically is how do I reference those objects to store them in a
collection?
I'm particularily interested in the typed DataSet Objects, the typed
BindingSources, and the typed TableAdapters. The problem is that the
designer code resolves to a type of
Form1.EmployeeDataSetTableAdapters.EmployeeBaseTableAdapter causing a
problem when I want to store them in a collection.
Please help Im really stuck here.
Thank you!
Ron Tag: XML files Tag: 545632
Creating struct instead of class using ModuleBuilder.DefineType
Hi
I am trying to dynamically create a struct using the following code:
TypeBuilder typeBuilder = moduleBuilder.DefineType("MyStruct",
TypeAttributes.Public);
It appears that this method will only ever create classes for me. Is there
any way of dynamically creating a struct? I noticed that other constructs
such as enums have their own equivalent define method (DefineEnum), but
couldn't see a way of doing this for structs.
I have to use a struct as this object is passed to a FORTRAN DLL which does
not like the class equivalent.
Best regards
Marek Tag: XML files Tag: 545618
newbie thats needs a little help with a dll issue
Hello All,
First, I'm newer than a Newbie... I know its sad, but i'm trying to start
somewhere.
I'm attempting to write what I thought was a very simple program that would
call another program from a command line. Now I got that part to work, but
got hung up on packaging the exe (and its supporting dll) to the target
computer.
So I found an open source program that extracts and create cab files. So
using that I created a small progy to create the cab file containing the the
two other files I need. Then modified my code to call the dll file that I
included into the program(the cab extractor program.. I might also mention
that the open source program is writen in C++ not C# and comes as a dll file
that I included into my project). Everything was working fine till I moved
my program to another computer and discovered that the dll file from the cab
program is not included in my exe file. It has to be copied to the same
directory as my exe.
So does anyone know how integrate that dll file into my exe, or a way to
include it as a resource file and extract it to the working directory(i've
search high and low for that and can not find anything).
I've tried to use the al.exe program included with the SDK's in VS08 but its
fighting me every step of the way. I keep getting caught up on finding the
main entry point. The main entry point in my app is under the program.cs
class - method main. So in the al.exe command line I include
"/main:program.main" like the tech net article refers to.. but it keeps
erroring out.
If anyone has suggestions please respond. I could use a little help before
the sanity fails!!! LOL
Thanks,
Aaron Tag: XML files Tag: 545611
DataGridView into another DataGridView
Hi,
I'm a tables one to many.
I want to do the DataGridView of a particular row, to expand into
another DataGridView, but in the row of the first DataGridView
Any idea?
Gracias Tag: XML files Tag: 545604
Driving a C# application using an unmanaged MFC application
Hi
We have a C# application that we need to "drive" using an MFC application.
The kinds of things we need to do are to instantiate the C# application and
tell it to load a certain file and then take certain actions. It would also
be good if the C# application could somehow post/fire messages/events back to
the MFC application. I know that a lot of this kind of thing can be done
using StartProcess, SendKeys etc. nad that COM might be an option, but I
wanted some feedback as to the best way of tackling this problem.
Best regards
Marek Tag: XML files Tag: 545600
Code snippets & field/property names
Is there any way in code snippets that I can have a single replacement field
from which I can generate both a field name and a property name along the
standard lines, i.e. camle case & Pascal case respectively?
private int myProperty;
public int MyProperty {get; set;} Tag: XML files Tag: 545599
Do I need to manually escape special characters for
I have an .MDB which has a table, and let VS.NET generate all the
necessary classes for my DataGridView. Now, I want to filter the rows
on user's requests. I could simply use .Filter property, like
.Filter = "ColumnName ='%" + keyword + "%'";
But come to think of it, the keyword, which is input by users, could
contain characters like ', % or whatever special characters that the
Filter method uses. Do I need to manually escape special characters
for BindingSource.Filter? As told before I should not reinvent the
wheel, if there already is a method for this, I would like to use
that. Escaping special characters should be required for all
applications like this so I thought there probably be a method. I
tried to find a method like that would do that, but couldn't find any.
Would you please give me an advice? Tag: XML files Tag: 545598
How to deploy and start Windows Service?
I'm doing Windows Service programming using C# 2005. My solution
contains Windows Service project. Then I added Setup and Deployment
project into the same solution. Both service- and Setup and Deployment
project are working fine. After running setup, it made files into the
C:\Program Files\MyCompany\MyService, but how can I install service into
the services and start this service using only Setup and Deployment project?
Now I can do this using install.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /i MyService.exe
NET START MyService
...and uninstall it using ininstall.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /u MyService.exe
Or am I doing this correct way at all? What is the correct way to
install this kind of service easily?
--
Thanks in advance!
Mika Tag: XML files Tag: 545586
Confused about ComboBox and DataBinding
I'm surprised that I'm having trouble with this, I suspect that I'm having a
major brain fart and expecting something to work a way it doesn't.
In my example, I have a List<> of custom objects bound to a ComboBox.
I then have a single instance of the custom object which I have bound to the
SelectedItem property.
I'm expecting:
1) When the user changes the selection from the drop down the single, bound
instance will reference the selected item from the bound collection.
2) When binding the control to the single instance, it should select the
item in the list that matches (if there is one)
Here is a very simple example. I didn't include all the WinForm stuff, as
long as you have a ComboBox names comboBox1 it should be cut and paste.
<code>
List<SomeObject> _objects;
SomeObject _object;
public Form1()
{
InitializeComponent();
_objects = new List<SomeObject>();
_object = new SomeObject("C", 3);
_objects.Add(new SomeObject("A", 1));
_objects.Add(new SomeObject("B", 2));
_objects.Add(new SomeObject("C", 3));
_objects.Add(new SomeObject("D", 4));
comboBox1.DataSource = _objects;
comboBox1.ValueMember = "Value";
comboBox1.DisplayMember = "Display";
comboBox1.DataBindings.Add(new Binding("SelectedItem", _object,
"Value"));
comboBox1.SelectedIndexChanged += delegate(object sender, EventArgs e)
{
MessageBox.Show(string.Format("_object.Value = {0}\n_object.Display
= {1}", _object.Value, _object.Display));
};
}
public class SomeObject
{
private string _display;
private int _value;
public SomeObject(string display, int value)
{
_display = display;
_value = value;
}
public string Display
{
get { return _display; }
set { _display = value; }
}
public int Value
{
get { return _value; }
set { _value = value; }
}
}
</code>
If I change the code to use SelectedValue then it will select the correct
item in the list, however making a new selection in the list does not update
the _object reference OR it's Value property.
If anyone can straighten me out on this I'd really appreciate it, I'm going
in circles over here! ;0)
-Steve Tag: XML files Tag: 545576
ANN: Version 3.1 of VintaSoftTwain.NET Library has been released.
What's new in this version:
- Acquisition algorithm has been optimized for compatibility with HP
and Fujitsu scanners.
- Opportunity to use any authentication schemes (such as basic,
digest, NTLM, and Kerberos authentication) at image uploading has been
added.
- Redirection functionality has been added to image uploading
algorithm. Tag: XML files Tag: 545574
I have to convert word 2007 files in xml using c#.
but i don't have any idea to do this pls help me to do this.