|
Hi Sonu
You need symmetric algorithm for functionality like encrypting password. In symmetric approach single key is used for encrypting strings. You can visit my blog http://aamironline.blogspot.com/2006/08/simple-encryption-and-decryption-with.html[^] where I have created a Cypher class for such purpose.
If you are using login control for authentication then you will have to subscribe to Authenticate event of the control. Following sample code shows you how to do authentication with login authenticate event.
protected void Login_Authenticate(object sender, AuthenticateEventArgs e)
{
if (Login.UserName == "Aamir")
e.Authenticated = true;
else
e.Authenticated = false;
}
|
|
|
|
|
I have a problem in my C# project
I added a User Control in my project & added some items form Toolbox to it.
the items are 2 panel(panel1,panel2). so I add this control to my window application
Now I want,When I drag an item from ToolBox to my control, it locates on panel2.
How can I do this.Please help me.
ThanX in advance
|
|
|
|
|
|
That was good,
if you read carefully the question,
I have two panel ( Panel1 , Panel2) in my Control and i want the item from ToolBox locates on Panel2. How can i do it?
|
|
|
|
|
hi you can overide controlsadded in your usercontrol and destroy the added component and create new instance of the same and add to your panel.
but there is a problem.. as it can add to the controls to panel but you can relocate the cotrol.
The code is below,sorry dont have much time to explore more in to it.Dont know how helpful its to you..
good luck.
bool _tmpOnRelocate = false;
protected override void OnControlAdded(ControlEventArgs e)
{
try
{
DesHost = this.Container as IDesignerHost;
if (DesHost != null && e.Control.Parent == this)
{
if (_tmpOnRelocate) return;
this.SuspendLayout();
Control _Holder = e.Control;
_Holder.Location = new Point(0, 0);
_tmpOnRelocate = true;
IComponent _tmpComp = DesHost.CreateComponent(_Holder.GetType());
DesHost.DestroyComponent(e.Control as Component);
((Control)_tmpComp).Parent = this.panel2;
this.panel2.Controls.Add(_tmpComp as Control);
this.ResumeLayout();
_tmpOnRelocate = false;
}
else
{
base.OnControlAdded(e);
}
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}
//base.OnControlAdded(e);
}
Where there is a will,there is a way.
|
|
|
|
|
Thanks,
But when i drag a control to my User Control,
'Child' is not a child control of this parent error occurred
|
|
|
|
|
Hi
i am using a folder that contains png file
i want to make this folder relative to my application.
How can we do this
btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(@"E:\GUI SkeltonButton\GUI Skelton\png1\002.png");
where should i place the png1 folder that need not give the full path in c# application
|
|
|
|
|
Ur folder png1 set in same path where is ur EXE file and call path like this:
<br />
btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(Application.StartupPath + @"\png1\002.png");
|
|
|
|
|
I ought to have the live mail look in the windows forms, yet im stuck on the part where the mail list is displayed on which we click to see its details ( The Middle Panel ). We can also sort our mail in that panel(jz for clarifying) ... can u plz tell me how to give that look in Windows Forms....
Thanks in advance ...
Abdus Samad
Bye
|
|
|
|
|
Hi
i need regular expression for time (24 hours) like 23:10:18
can anybody provide me.
regards
sAqIb
|
|
|
|
|
I have this regular expression:
^(20|21|22|23|[01]\d|\d)(([:][0-5]\d){1,2})$
its workign for 24 hours time but works only till minutes. i mean it can only check the time like 23:17 (do not checks the seconds, and gives nothing if there are seconds in teh time also). can anybody extend it to seconds also?
regards
sAqIb
|
|
|
|
|
HI,
I am developing an application which downloads data from remote location in chunks. ie, the data is split into segments and all segments are to be downloaded parallely. The problem which occurs is that only about half of data is downloaded and then the execution stops!
Can anyone help me??
Ajay Cilly
(cilly_brain)
|
|
|
|
|
I want that user can select fields from form and than only that selected fields can display on the report using C# & ADo.NET connectivity.
Can anyone help me!!!!!
-- modified at 2:30 Thursday 28th September, 2006
|
|
|
|
|
There are few ways to do that,
1)If you have reports in your project itself you can use iteract with section items collection and make appripriate items suppress attribute to false.
2)If you have reports as report file(*.rpt) you can play around with the datasource,
a) Make sure you have selected verify database on every print
b) by using ADO.NET method fill a dataset with selected fileds,then set the datatable or dataview as a datasource for the report.
the second solution worked for me with a simple check list report,never tried the first one..
Good luck
Where there is a will,there is a way.
Where there is a will,there is a way.
|
|
|
|
|
We have a flash MP3 player that we are integrating with our database application. The mp3 files are stored in the database (SQL Server).
We would like to know how to feed a byte[] array to the src attribute of the flash file, so that we can play the mp3 files without writing them to disk first.
We already have an http handler utility that gets the mp3 files from the database and writes them to the output stream of the response object.
sanjeev
|
|
|
|
|
Make an aspx page that reads the dataout of the database then writes the bytes out directly (instead of html) use that page as the src on the flash (i.e. youpage.aspx?mp3id=45)
|
|
|
|
|
I have application in which it shows all the application currently running.Now I want to show the icon for the perticular Application along with the name but i a mnot able to retrive icon part.
Can anyone help me???
<marquee>nishu
|
|
|
|
|
Hello
Get the handle of the window -if present. You have to check that out first-, then send WM_GETICON message to get the handle of the icon. Now you can initialize an Icon object from that handle.
Regards
|
|
|
|
|
Thank you Nader.....
Now I got that how to do it !!!!!Thanx for your help
<marquee>nishu
|
|
|
|
|
I want to wite a program to get data from website:http://www.bidv.com.vn/BSC/op.htmand save it to database but don't how to do. Can anybody help me? Information i need is about stock quote.
Thanks in advance
zappa
|
|
|
|
|
If they don't offer a webservice, then you need to load the page and parse the HTML. If you're lucky, the page is XHTML, otherwise you need to string mash it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Sorry but can you say more detail. I'm a beginner. Thanks
zappa
|
|
|
|
|
I've written a Web Service which encrypts files via the RSACryptoServiceProvider. Everything is going great with the code except that I am experiencing a build up of key files in my Crypto\RSA\MachineKeys directory. I have verified that it is because every call to the WebService creates a new instance of RSACryptoServiceProvider which creates a new Key. I am using the FromXmlString method to restore a previously used Key Pair which I persist to a file between calls to the Web Service. This only occurs after I have created the new instance of RSACryptoServiceProvider though so the new key is already created. Is this something I need to worry about? Will Windows clean this directory from time to time or am I doing somthing wrong ?
|
|
|
|
|
In my project i have two themes(white and blue). I have one master form. I want to implement the theme in master form so that all child form comes in same theme. Is this possible?
|
|
|
|
|
Hello
Harikrk wrote: Is this possible?
Yes! Why not?
One way to do it, is to store your theme images -if any- and other data in a file -could be zip, SqlDb, Resx, whatever...-, then make your forms read it from there according to the current settings.
Regards
|
|
|
|