|
I wasn't implying that another call to BindData() would be problematic. It was just a way of explaining why the SqlHelper method was executing before the Button's Click handler. Without that call in Page.Load, I wouldn't expect the grid to show any data because that call is what initially populates it.
Josh
|
|
|
|
|
leckey wrote: When I went through the debugger it looks like it tries to run through the SQLHelper code before it looks at the button click function.
Perhaps some other code in your app is calling SqlHelper methods too.
I assume that your BindData method (or the SqlHelper method) is being called from somewhere else in the application. You can do a global search in Visual Studio (hit Ctrl + Shift + F10) and search for DataBind or SqlHelper. See what you come up with. Alternatively you can set a breakpoint in the SqlHelper method, run in Debug mode, and when the breakpoint is hit you can check the Call Stack window to see what method called it.
If there is such a thing as Hell, it appears that you have entered it.
Cheers,
Josh
|
|
|
|
|
hello im using the graphics class to draw some stuff on a form.
Graphics Draw = this.form1.CreateGraphics();
Draw.FillEllipse(Brushes.Red, Circles);
something like that. But once the graphic is drawn and i move another form over, it disappears. so how can i keep my graphic display all the time.
Thank you
Donkaiser
|
|
|
|
|
You could create an image, get the graphics context off of the image, and draw it there. Then just keep that image up on the form.
Logifusion[^]
|
|
|
|
|
do you have an example? I know the logic but im sure C# has some class that will take care that.
and by image u mean a bitmap image or jpg image.
Donkaiser
|
|
|
|
|
Absolutely. Take your form and add a PictureBox control to it. Then in your constructor you can do this:
this.pictureBox1.Image = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height);
Graphics g = Graphics.FromImage(this.pictureBox1.Image);
g.FillEllipse(Brushes.Red, 5, 5, 50, 50);
You don't have to set anything on PictureBox, just put it on the form.
Logifusion[^]
|
|
|
|
|
The graphics drawn disappears because when you move the form, paint event occurs and it rpaints the form which eventually overwrites what you have written.
To make the drawn graphics persistant try to override the Paint event of the form.
Put your painting code in it.
Hope this helps.
Every bit counts
ADD
|
|
|
|
|
Hi,
I am working on a little project right now and I need a little help getting started. I have an access database that is a giant mess with disorganized fields, data put in the wrong places etc.
What I want to be able to do is organize the data, export the new data to either a CVS file or some other readable file and put the garbage in a seperate notes feild. Then import all of the new data into an organized Access database. The problem is of course that the data is not organized and I thought it would be a fun project that could be usefull to other people. Also their is some redundancy in the database I would like to eliminate and sometimes abbreviations are not consistent.
I was wondering if this would be the best way of doing it (or even if I could complete the project this way)
Create An application to load the Access Database
Be able to search within the fields of information and replace inconsistent abbreviations with the one I that i have picked (I of course will have to allow the user to change this input per column) and delete what it is replacing.
Can I use a string split to create tokens to bust up the different data in some way and then reorder it in a specefic order.
Is it possible to have something that reads Agoodkid Johnny Smith
bust it up then reorder it to be Smith Johnny A goodkid and then have it proceed onto the next one that maybe even more messed up like 8989879RobCell Robert Smith
I had planned to use Regular Expressions but sense the data is not consistent in the way it is structured is it still possible to do this.
Would it be more advisable to tokenize all of the data just by cutting it up into pieces, saving it in some way (although I am not sure how I would do that) export all of the data to an XML file, tear it apart, then just call different parts of it in the right order based upon just querying on the XML document.
In summary after that somewhat confusing text
What would be the best method of fixing a very disorganized database by creating a utility to correctly order, change, edit and export the data into a new table (or data source of some kind)?
|
|
|
|
|
Hello,
i have a problem while working with tree view control in window application.
Consider below tree
Window Application
|___ Language
|____ C++
|____ VB
|____ VC++
|____ . Net
|___ C#
|___ VB.Net
I am filling tree on form load and if i want to directly focus to node C# (it gets selected) and i want that tree to be expand up to that level.
and i have the imageindex of C#.
How to do it ???
Its urg (((
Thanx in Advance ))
|
|
|
|
|
You may want to use TreeView.FindNode() to find your node. The path will be something like "Window Application" + tv.PathSeparator + etc. Then use the Select() method on that node.
Logifusion[^]
|
|
|
|
|
Iam still wondering! what the IIS is doing after a lot of googling.can any point out me some links for IIS(basics-What is actual purpose) and Active Directory(concepts)Please
Thanks
Srini
|
|
|
|
|
Hi All,
I am trying to zip files in a folder using the J# library. I am using the java.util.zip namespace for this purpose and i am able to zip files in a folder. But now i want to know whether there is any option for password protecting zip files using the same namespace. Actually i wanted to apply a password for zip files and when i open in winzip it should ask for the password set in the zip file. Is this possible using the same namespace or is there any solution for my problem if one exists ?
I would be greatfull to read all the replies.
Thanks !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
|
Is there anyway to get the picture taken from TakePicture directly from memory [advoiding a file write] from WIA's TakePicture under the WiaVideoClass method?
I've tried a RAM disk but that is still taking more time than needed.
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
hi all,in my application,there is a option to attach the file using html file field ( of course it work well).Before saving the file( using file.postedfile.saveas )it will ask the user like "are u sure to save this file?" using popup (another aspx file).when the user click on yes button (on popup) then it should save that file ,if the user click on NO button it shouldn't save the file.
my prob is: when the popup displays the file field value are get erased,so when the user click on the YES button it show error.is there any way to solve this prob......?
Regards,
ayyp
|
|
|
|
|
hi all,
i try to read and simultaneously write the date read in a file from serial port.
have some code like this:
StreamWriter sr2 = new StreamWriter(new FileStream("output.txt", FileMode.Open, FileAccess.Write));
sr2.Write(string data = comport.ReadExisting());
// Read all the data waiting in the buffer
//data = comport.ReadExisting();
// Display the text to the user in the terminal
Log(LogMsgType.Incoming, data);
this gives error ;( cant read and write in a file at the same time. reads just a few characters then stop reading the rest.
if i dont write data in a file, then i can read the existing data with no difficulty.
(just this data = comport.ReadExisting(); part works fine and reads everything in buffer)
but i want to do both! how can i achieve this ?
help please ...
|
|
|
|
|
Could you simply do the write operation, close the port, then re-open to read it all?
Oops, looks like I misunderstood your question. Create a string variable that holds the contents of the read data from the serial port. You can then do whatever you wish with that string variable, thus alleviating the need to call ReadExisting multiple times.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:11am.
|
|
|
|
|
|
Hi
I have a program which is a ftp client and uploads files on ftp, it is based on blocking socket, sometimes it blocks when calling socket.receive(), how can i convert it to non blocking or set timeout so that if received is not returned in say 10 sec, exception should be thrown.
Regards
Shajeel
|
|
|
|
|
|
I'm trying to develop an application wherein I have an XML file. The contents of this XML file should be dynamically converted into a C# class(with properties). I learnt when the contents of a C# file ie properties are given to Microsoft property grid in .NET, all the fields in the grid are populated with the C# class properties. Could the classes that you have mentioned be of any use to my application. I was exploring the idea of developing a wizard in VC8 that should address this situation. I have many xml files and the point here is that I want a generic application to do this job.
The whole idea behind the above design is to show xml data to the user and when the user edits the data from the grid the xml file gets updated. Any comments are highly appreciated.
Thanks
|
|
|
|
|
|
Thanks for the reply, but if I have to develop something like a wizard in VC2005, then what changes do I ought to do. basically the thing is that we do have a whole lot of ini files aand at any moment we can have a situation to change an ini file. This neccesitates generation of a tool whcih is genric enough to handle the operatio. Each ini file is unique and is supposed to have a unique C# class for it. The wizard whould be capable enough to convert the XML data to C# file. The above discussion is based on the fact that I have a way to convert ini file to XMl or is there any better way lets say directly pass the ini field to the wizard.
|
|
|
|
|
As far as I know property grid does not take C# file. It takes object of a class and populates itself with the properties of the object.
Since you have XMLs ready, serialization wont help you in easy way.
You would need to follw these steps..
- Design a serializable class with the same structure as your XML file.
- Parse XML for the first time to populate an object of that class.
- pass that object to the PropertyGrid
- Serialize the object to an XML file when user wants to save it.
- Use this XML file in the future not the original one. Which would make you enable to directly deserialize the file into an object instead of parsing it.
This may not be the best possible way but...
Every bit counts
ADD
|
|
|
|