|
Hi i have 2 drop downlist box,
in that one i can select year another one month,
if i select the month,that month all dates want to be display in datagrid,
how to do that
regards,
Magi
|
|
|
|
|
u can do that using below code
Dim i As Integer = DateTime.DaysInMonth(2005, 1)
it will give u total no of days of month January and year 2005.
and then display it from 1 to i.
Thank,
Sun Rays
|
|
|
|
|
Hello,
Hello friends i need your help.in my project i want to encrypt login details
can anybody help me to solve this....
Regards
Alex.
|
|
|
|
|
Hello Alex,
It is always good to encrypt these login details): You can implement this in different ways. Here is a small code snippet which does exactly the same thing using JavaScript:
I have taken a look on this javascript earlier at http://www.webteacher.com/. This is a small example but it should get you started on encrypting these login details.
Regards,
Amit Pal
|
|
|
|
|
Thanks amit,
But i need the code for encryption and decryption ,if possible using c#
alex.
|
|
|
|
|
OK you want the code in C# means encryption at server side
Why you want to Encrypt the value at the server side do you want to store that value in database something like that
Best way is to have own algorithm to encrypt and decrypt the data
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Dim d As New EncryptedData
d.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES
d.Content = "hello"
d.SetSecret("23456", CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD)
Dim textenc As String = d.Encrypt(CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64)
Response.Write(textenc)
Dim d1 As New EncryptedData
d.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES
d.SetSecret("23456", CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD)
d.Decrypt(textenc)
Dim textdec As String = d.Content()
Response.Write(textdec)
Try the above , the value given as string in the function SetSecret is the key I am using , u can use anything. Add a reference to Capicom in ur project and then implement the same
|
|
|
|
|
Hi thanks,
I couldn't able to implement this in asp.net c# can you help me.
alex.
|
|
|
|
|
string strencrypteddata="";
EncryptedData encryptdata = new EncryptedDataClass();
encryptdata.Algorithm.Name = CAPICOM.CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES;
encryptdata.Algorithm.KeyLength = CAPICOM.CAPICOM_ENCRYPTION_KEY_LENGTH.CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM;
encryptdata.SetSecret("dasdsads",CAPICOM.CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD);
encryptdata.Content = "hello";
strencrypteddata = encryptdata.Encrypt(CAPICOM.CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64);
decryption ::::
string strencrypteddata1;
EncryptedData encryptdata1 = new EncryptedDataClass();
encryptdata1.Algorithm.Name = CAPICOM.CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES;
encryptdata1.Algorithm.KeyLength = CAPICOM.CAPICOM_ENCRYPTION_KEY_LENGTH.CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM;
encryptdata1.SetSecret("dasdsads",CAPICOM.CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD);
encryptdata1.decrypt(strencrypteddata );
Response.Write(encryptdata1.Content);
|
|
|
|
|
Hi
sorry for the disturbance..
how can i declare this
EncryptedData encryptdata = new EncryptedDataClass();
i coudn't able to
is there specific name space is needed
i added
using System.Security.Cryptography;
but still problem
pls help me
alex
|
|
|
|
|
I had written in the first mail itself to add a reference to Capicom in ur solution and then write using Capicom and then u will b able to use this code
|
|
|
|
|
sorry i am confucing,
From where i will add reference to my project...i mean Capicom..
alex
|
|
|
|
|
I suppose u have ur solution opened in front of u , You will be able to see a references folder , right click , add reference . Click on the COM tab and there look for Capicom. select the same and then it will appear in the references folder in ur solution. Now in ur page add the line using Capicom.
Is it ok now
|
|
|
|
|
Hello
I didn't found anything in the com tag named Capicom
i am using .net 2.0 ...sorry for the disturbance.
alex.
|
|
|
|
|
Please follow this link and register the Capicom.dll in your system32 . this link gives u a download of the same
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en</a>[<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en" target="_blank" title="New Window">^</a>]
|
|
|
|
|
How i can display all the countries and based on each country that particular states in two comboboxes.instead of saving all states in database any built in class is there?
|
|
|
|
|
hi anujose,
if you want to fetch any data then you have to read any database or file...
here you dont want to fetch data from database thenyou can fetch data from XML file..
prepare some structure in XML like..
<country>
<countryname>INDIA
<countrycode>IN
<state>St1
<state>St2
.
.
.
and then read this XML and bind that datatable with your controls...
Bye have a nice day...
Chirag Patel
|
|
|
|
|
hi anujose,
if you want to fetch any data then you have to read any database or file...
here you dont want to fetch data from database thenyou can fetch data from XML file..
prepare some structure in XML like..
<Country>
<CountryName>INDIA</CountryName>
<CountryCode>IN</CountryCode>
<State>St1</State>
<State>St2</State>
.
.
.
</Country>
and then read this XML and bind that datatable with your controls...
Bye have a nice day...
Chirag Patel
|
|
|
|
|
i don't want to save the list of all countries by hand in anywhere
|
|
|
|
|
Then where yo want to store you must have to store the data you want to display
You can't show it on fly ...........
Whats your idea ? how you want to implement it ? what is the problem in storing the data ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Ok let the end user type his/her country
Thomas
|
|
|
|
|
then you can create user control and use it in databinding...i think you will not find any third party control exactly same as your requirement..
bye
Chirag Patel
|
|
|
|
|
Hi,
I have a batch file(test.bat) i wrote a command to rename a text file in this batch file. Both batch file and text files are in Network Shared Drive. I am trying to run that batch file from ASP.NET application using VB.NET as a code behind. The following is the code i wrote,
Dim p as new ProcessStartInfo
p.WorkingDirectory = "\\networkSharedDrive\SharedFolder\"
p.FileName = "testcab.bat"
p.UseShellExecute = True
Process.Start(p)
This code is executing fine, It is not giving any error also. But the text file name is not changing. When i directly double clicking on that Batch file the name of the text file is changed that means, batch file is executing fine. But Through the above code it is not working.....
Any ideas....pls help me......
Vijay Kumar
|
|
|
|
|
Hello Vijay,
Earlier I was also stuck on this issue. What I have figured out was that there were some unattended processes which are making this happen. I tried a lot however was unable to resolve this issue. There is a nice workaround available on this link:
http://codebetter.com/blogs/brendan.tompkins/archive/2004/05/13/13484.aspx
This workaround has always worked at my end and I hope so it will work for you also.
Regards,
Amit Pal
|
|
|
|
|
How can I get Application Settings Key Values of web.config through Java Script?
Please any one help...
|
|
|
|