|
Karan_TN wrote: but i m NULL in THREADING concept.
Check this out:
Loading Bar
|
|
|
|
|
Hy,
i need to write a code in java script such that when i click on date in the calender(i.e select date of birth).then i should get the current age (dd/mon/yyyy format)by subtracting it with the current age.
|
|
|
|
|
Thats nice.
Have you not written any code yourself?
|
|
|
|
|
hai.
currently i m using asp.net with c# (framework 2.0)
i have created a style sheet and included in my project. i applied for the textbox,buttons,labels etc...
i prompt a message box when user clicks one button... (like
Response.Write("<script>alert('Fill all the mandatory fields to proceed!');</script>"); )
The problem is when user press the button the message box prompts and the stylesheet properties disappear... how to solve it.
Help me plz... - KARAN
|
|
|
|
|
can we decrypt MD5 algorithm key to original text.Please help me
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
ANSWER:=
private void button1_Click(object sender, EventArgs e)
{
string sd = EncryptMd5("Piyush Vardhan Singh Rajkumar", "sdf");
MessageBox.Show(sd);
string dd = DecryptMd5(sd, "sdf");
MessageBox.Show(dd);
}
public static string DecryptMd5(string sToOriginal, string sPassKey)
{
try
{
byte[] sPassKeyArray;
byte[] sOriginalArray = Convert.FromBase64String(sToOriginal);
MD5CryptoServiceProvider MD5Hash = new MD5CryptoServiceProvider();
sPassKeyArray = MD5Hash.ComputeHash(UTF8Encoding.UTF8.GetBytes(sPassKey));
MD5Hash.Clear();
TripleDESCryptoServiceProvider tripleDesCsp = new TripleDESCryptoServiceProvider();
tripleDesCsp.Key = sPassKeyArray;
tripleDesCsp.Mode = CipherMode.ECB;
tripleDesCsp.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tripleDesCsp.CreateDecryptor();
byte[] resultArray = cTransform.TransformFinalBlock(sOriginalArray, 0, sOriginalArray.Length);
tripleDesCsp.Clear();
return UTF8Encoding.UTF8.GetString(resultArray);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return null;
}
}
public static string EncryptMd5(string sOriginal, string sPassKey)
{
byte[] sPassKeyArray;
byte[] sOriginalArray = UTF8Encoding.UTF8.GetBytes(sOriginal);
MD5CryptoServiceProvider MD5Hash = new MD5CryptoServiceProvider();
sPassKeyArray = MD5Hash.ComputeHash(UTF8Encoding.UTF8.GetBytes(sPassKey));
MD5Hash.Clear();
TripleDESCryptoServiceProvider tripleDesCsp = new TripleDESCryptoServiceProvider();
tripleDesCsp.Key = sPassKeyArray;
tripleDesCsp.Mode = CipherMode.ECB;
tripleDesCsp.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tripleDesCsp.CreateEncryptor();
byte[] resultArray = cTransform.TransformFinalBlock(sOriginalArray, 0, sOriginalArray.Length);
tripleDesCsp.Clear();
return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi all,
I'm working on a survey kind of program: There's a set of survey subjects and inside those survey subjects there comes a set of survey questions. What I wanted to do is chain those survey subjects together in a "previous" & "next" fashion, e.g. when I click the next button the page will display the next survey object and same thing happens to "previous" clicking. Is it possible to bind the data to some kind of navigate control or something like below (increment/decrement the VoteID and bind the radio list (survey questions) with another set of data)? What’s the standard way of doing this? Is there any samples? I’m completely new to ASP.net.
string strConn = ConfigurationSettings.AppSettings["ConnectionString"];
SqlConnection conn = new SqlConnection(strConn);
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "GetOptions";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@vote_id", VoteID);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
conn.Open();
da.Fill(ds);
rblOptions.DataSource = ds.Tables[0].DefaultView;
rblOptions.DataTextField = "content";
rblOptions.DataValueField = "id";
rblOptions.DataBind();
But the "increment/decrement the VoteID" method has drawback once the VoteID's value is not consecutive.
Thanks,
modified on Friday, November 7, 2008 3:04 AM
|
|
|
|
|
Hi,
I am new to ACT, when i am trying to record through application centre test, it s opened the Browser, when i entered my application its showing page cannot be displayed (My application is Windows authenticated)
(suppose i entered the google its asking for the user name and password, then its opend.) then i can open my application, but ACT is not recording.
I changed the proxy settings also.
Still i am not able to record. Could you please solve this problem.
ACT proxy settings are: Localhost,8181
I am using 100.141.11.14, 8080
sarada
|
|
|
|
|
Hi All,
Is there any possible way to create an email attachments from an URL in C# application? I'm using frame work 2.0, System.Net.Mail component.
If I attach a file from my file system, that works fine. But I have to
call a http:// url which retruns a file name. I have to attach that
file to the email.
Can any one help me with this?
Thanks in Advance.
|
|
|
|
|
hi
i have a Usercontrol in that one DropDownbox it has the property of Autopostback =false. when the dropdownbox items changed the textbox characters maxlenth 15 and 16 how to write the code in javascript. the textbox also there in usercontrol only........
Regards
D.V.M.Guptha
|
|
|
|
|
Are you facing any issue ?
can you post some code that you have written ?
At least put some efforts to write/learn javascript.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
I have created a usercontrol with some labels. I am using this control in a aspx page, and I want to set the text property of those labels thru session variables. Can anyone help? Thanks, Rohini
|
|
|
|
|
Are you facing any issue ?
Just create public properties for these Labels in the user control and set from the Page ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
yes, I have created public property and am able to set its value as a static text. But I need to bring it from a session variable.
|
|
|
|
|
Can you post your code ?
Are you new to ASP.NET or never used Session before ?
Then just google for the topic
or
ControlId.Propertyname= Session["KeName"];
but first check for null or empty
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hey, I was wondering if there was a way to display a session variable that is outputted directly as text.
Something like this
Session Variable is FirstName
Logged in as: {INSERT FIRSTNAME HERE}
I know I could use a label and set its text on the page load, but isn't there a simpler way using the <% %> stuff
|
|
|
|
|
Like this? <%= Session["FirstName"] %>
|
|
|
|
|
Yes...That's exactly it! Thanks , can't believe it was *THAT* simple!
|
|
|
|
|
suppose I have two pages in my project:a master page and a content page; In the master page I have one textbox(named SearchTextBox) and on ImageButton(named SearchImageButton). And in the content page I have a textbox(named NameTextBox) and one Button(named LoginButton);
Problem description: In the content page, if I have finished input some words in the NameTextBox and press "Enter" key, the SearchImageButton will be fired and executed, not the LoginButton! This was not what I want.
My question is: How can I fired the LoginButton when I finished input words in the NameTextBox and press "Enter", not the SearchImageButton(I can only modify the master page)?
|
|
|
|
|
|
Thank you for your answer!
I'v tried the example you provide. But it not suitable for my project. Maybe you doesn't understand my question.
My situation is between two pages, one is master page and the other is content page. We want to fire the button on content page when we press "Enter".
|
|
|
|
|
That was not exact code you required, you need to put your logic there
You are not having 2 pages, At the end master Page is like control in the content Page, you need to use java script for that just google it.
|
|
|
|
|
Thank you for your answer!
I will try to refer the logic you provide. But I can only modify the master page(because we have many content pages so...)
|
|
|
|
|
I think there is some confusion at your side ...
are you new to ASP.NET ?
if you are using Master Page in the application then there must be many content pages in the application.
TOALPCWJ wrote: But I can only modify the master page(because we have many content pages so...)
This is confusing statement from your side
Just modify the Content Page also is there any issue into that ?
Please let me know
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Yes, I'm a freshmen to ASP.NET.
I mean our project only have one master page. Because our project also contains a lot of content pages, so if I can just modify master page to achieve my result rather than modify so many content pages, that will save a lot of work and much better.
Thank you for your concern!
Thanks!
|
|
|
|