|
Hi,
I want to create a simple C# applicaion which alerts me in an msn like alert window that a change has made to the database.Can anybody tell me how to do this or is there any resource in MSDN or the topics which i have to study to accomplish this functionality.I will be very thankful if some one tell me.This is really important plz.
thanks and regards.
bye
|
|
|
|
|
you can use triggers so when event happen do somthing
like write what happend to file check this file from your
programm in interval time
another thing look at documentation see if you can consume triggers directly from your program
MCAD
|
|
|
|
|
i am trying to get a few dynamic image forms/pages/whatever you want to call them on my site, i made a form that simply writes the binary stream for an image object into the response stream and this works, but i need to get this to function while the file is .jpg and not .aspx
does anyone know how to make IIS handle .jpgs as .net apps?
|
|
|
|
|
In IIS manager, open the properties for the site, go to the Home Directory tab and click Configuration. Look att the entry for .aspx files, and add one with the same settings for .jpg files.
---
b { font-weight: normal; }
|
|
|
|
|
i tried this and it doesn't seem to be working. i think it has something to do with content-type. in the code-behind i have to specify the content type to be image/jpg (or image/png) so that browsers like mozilla recognize it, is there a way to specify content type in the page directive?
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
Firefox: The image “http://localhost/DynamicImage/image.png” cannot be displayed, because it contains errors.
Iexplore: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="DynamicImage.WebForm1" %>
http://kbirger.no-ip.org/kir/image.png
http://kbirger.no-ip.org/kir/WebForm1.aspx
^ that's the working version
|
|
|
|
|
That is because the asp.net code is not executed at all. What is sent to the browser is only the contents of the file, unaltered.
Have you registered then .png file type to be handled by asp.net?
---
b { font-weight: normal; }
|
|
|
|
|
i registered both .jpg and .png the same as .aspx in the method mentioned above, but it still does not respond.
the page itself returns an image and only an image (if you look at the source / hex) so i don't see what the problem is
|
|
|
|
|
The problem is that the code for the page is not executed at all, as the server does not recognise the files as being asp.net files.
Check the settings again.
---
b { font-weight: normal; }
|
|
|
|
|
At the moment I have to reinstall something on each computer, so I'll be configuring it from the start.
All i have to do is go into the script configuration and change my image files to have the same settings as aspx files? i don't have to change the mime types?
|
|
|
|
|
|
that didn't seem to do anything. (i tried changing it between image/png and text/html)
|
|
|
|
|
Hi.I want to show in a datagrid data from tables Orders and OrderDetails(Northwind)using SQL Connection.Configuring DataAdapter everything OK until I choose SQL Statements .When I choose it and go Next I get a problem Generated Select Statement.Anybody can please me how can I change query so I dont get this problem?
|
|
|
|
|
Hi!
Im still new at programming but i'd try my best to be of assistance and hopefully I could be
First of all could you please post your queries for the 2 tables so we can have an insight of what the problem is,
Thanx!
Kampai!!!
|
|
|
|
|
Hello,
I wrote a method to convert image's color table.
public class convert
{
public static Bitmap bmp_convert(System.Drawing.Image pic)
{
Bitmap b = new Bitmap (pic);
BitmapData bmData =b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format16bppArgb1555);
b.UnlockBits(bmData);
return b;
}
}
unfortunately, I can't convert my image to Format8bppIndexed (or any indexed format) while to the other formats I can...(like: Format16bppArgb1555),why? and how can I fix it?
|
|
|
|
|
How would I go about embedding a combobox in a cell of a listview when set to details view? I've looked at this article ListViewEmbeddedControls[^] but unfortuatly the combobox height is bigger than the row height. Can I maybe overwrite the row height before drawing?
Thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Hi:
I'm using a datagrid in my project to display data from a dataset. The dataset is bound to the datagrid and several textBoxes. //this.datagrid.DataSource = this.dataSet; this.tbFamily.DataBindings.Add("Text",this.dataSet,"Table.Family");
I assigned the bound dataset to a bindingManager because I need to show the currently selected data from the datagrid in textboxes. //BindingManagerBase manager = this.BindingContext[this.ds, "Table"];
I use //this.manager.Position = this.datagrid.CurrentRowIndex; within a CurrentCellChanged event to control the position of the manager each time the user selects a new row in the datagrid..
This works fine until the datagrid is sorted by clicking on the Columnheader because the "sorted" data doesn't seem to "remember" its index prior to sorting...thereby displaying the wrong data in the textboxes
Can someone please show some code that I can use to make sure that sorted data remembers the pre-sorted index?
Thank you.
|
|
|
|
|
If you add this code to your program, the datagrid will be in a sorted format
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dataSet, "Table.Family"];
DataView dv = (DataView)cm.List;
dv.Sort = "xxx"; // the column you want to sorted.
Then you can use
BindingManagerBase manager = this.BindingContext[this.dataSet, "Table.Family"];
DataRowView view = (DataRowView) manager.Current;
DataRow row = view.Row;
to get the row you want.
Don't try to use the index, because it's not accurate if you delete a record from the datagrid.
Hope this helps
Asura
|
|
|
|
|
Thanks Asura. It was helpful.
|
|
|
|
|
I have two controls each of which have loops (we will call loop 1 and loop 2) that call a central function that sends and gets data via serial (we will call Communication function). Only one loop is to run at a time. The problem I am having is when the user requests loop 2 while loop 1 just started. Loop 2 alerts loop 1 to stop, but if loop 1 just started, it will still be calling the communication function until it finishes.
I hope this is makeing sense...
Meanwhile, loop 2 has started calling communication function as well and I am getting overlap. I cannot simple set a bit and exit the loop at the end. (It is a big program so you will just have to trust me.)
Is there a way to cache the values needed to be sent to the communications function?
Is there a clean way to exit a loop without it finishing?
Should I be focussing on trying to make the two (in reality 10) different loops NEVER call until all other loops are inactive, or should I be trying to make the communication function able to handle multiple calls?
Thanks in advance for your thoughts.
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
|
beautiful... I think that will work. Is it ok that I am not using threads. The call is subscribed to an event so I am not actually creating a new thread.
I will try it and get back.
Thanks,
Dwayne
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
Yes its ok that you are not using threads. Mutex works on single threaded applications as well.
|
|
|
|
|
As Peter says, you can use a Mutex. But if you don't need to synchronize between processes, you're better of using lock:
public sealed class MyClass
{
internal void Foo()
{
lock(this)
{
}
}
internal void Bar()
{
lock(this)
{
}
}
}
"God doesn't play dice" - Albert Einstein
"God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
|
|
|
|