|
After selecting what data you are getting this exception..?? show your code..
with regards
Karthik Harve
|
|
|
|
|
share your code.
When I face this problem,it is due to
I have two gridviews
and on click of second gridview linkbutton, I was using First gridview index.Thats the mistake.
FOr Gridview2 I was used
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = GridView1.Rows[index];
so ckeck for same.
|
|
|
|
|
show data of table1 of datagrid1 to datagrid2
how this is possible
rizvan sivally
|
|
|
|
|
make it clear to understand,so that we can give you an appropriate solution..
|
|
|
|
|
what do you mean by this. "table1 of datagrid1". is it Page 1 of datagrid1..?? mention clearly..
with regards
Karthik Harve
|
|
|
|
|
I want to use the visio activeX contorl in asp.net. Form where i can drawing the diagram.
hi
|
|
|
|
|
|
While searching code project articles on security. I found this article The Art and Science of Storing Passwords The rating for this article is very good, however the date is quite old. So I would like opinion's on the methods used in this article.
Thanks in advance
[edit] Fixed article title and format [/edit]
Frazzle the name say's it all
|
|
|
|
|
|
Though it was old article but the method is very good...you can try it.
Thank you
|
|
|
|
|
The methods haven't changed much in the last 20 years.
But the more secure you make your program, the more you realize that it can still be hacked, to an infinite point of thought.
Do the binary hash, and make a copy that is encrypted, or just the hash and a password reset, make a new hash.
|
|
|
|
|
Thanks for answering My post. I think I will store the salted hash and email a temp link for password reset.
I can try to make it somewhat secure that way.
Frazzle the name say's it all
|
|
|
|
|
That's how I started. Later on down the road, you'll need something else, and you can add it then.
|
|
|
|
|
Out of curiosity what more can I do? If You know of some learning resources I can use like books or links I would be most grateful.
Thanks in advance
Frazzle the name say's it all
|
|
|
|
|
The main goal is to obscure the password in the database in case someone gets a peek at it. Now you can encrypt the username, so if someone peeks, they can't put the 2 together.
You can encrypt the email address, so it is a mystery as to who it is.
On the customer service side, people will say I lost my password. Or what is my husbands password, assuming the husband uses the same password, so they can access his email.
Or people will forget their password, because they were drinking when they created the account, thus the password reset.
OK, so your all encrypted to the max, a programmer just needs the code, the key, and perhaps the IV to decrypt the data.
Is your data file protected, from internal or external theft? Can someone on the internet figure out how to steal it online.
It goes on and on and on.
|
|
|
|
|
hi
i am having the following function in javascript:
function passvalue() {
var editor = $find("<%=Editor1.ClientID%>");
var content = editor.get_content();
window.opener.document.getElementById("ctl00_cphMain_txtEditor").value = content;
self.close();
}
in this function in am getting the editor contents but all are in html format.
can anyone plz tell me how to convert the contents into plain text.
K.Gayathri
|
|
|
|
|
var nonHTMLcontent = document.getElementById(ControlIdContainsHTMLContent).contentWindow.document.execCommand("RemoveFormat",false,null)
Here
ControlIdContainsHTMLContent contains HTML content. In
nonHTMLcontent variable you will get content after removing formatting.
Hope this will help.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
hi
thanks for the reply
but in the code my document.getelementbyid(" ")
is not finding the element so only i am using find method..
so now how to proceed plz...
K.Gayathri
|
|
|
|
|
Hi,
I need to display data with dynamic generation of template column. The heading of the column is taken from database and its number will be dynamic. All the items of the columns will be template column to add a checkbox.
For this which control will be suitable?
DataList or ListView or Detailsview or any other controls?
eg:
I want to display the group and group member name like below with a check box in each item for edit
......Group1..........|.........Group1........|........Group1.........|........Group1........|
Name1 Checkbox | Name1 Checkbox | NameA Checkbox | Name7 Checkbox
Name9 Checkbox | Name4 Checkbox | NameS Checkbox | NameO Checkbox
Name7 Checkbox | Name6 Checkbox | NameC Checkbox | NameP Checkbox
Name6 Checkbox | Name7 Checkbox | NameR Checkbox | NameK Checkbox
Name4 Checkbox | Name8 Checkbox | NameI Checkbox | NameL Checkbox
Thankyou
YPKI
|
|
|
|
|
Excuse me,
I have listbox binded sql datasource. & also
I have one two textboxes.
now I want to insert listbox items and these textbox values into sql table by one Submit click.
for example: the listbox contain 3 items.
ListBox:
Item 1
Item 2
Item 3
Textbox 1: text1
Textbox 2: text2
I want to insert these above values into sql table,
I also want to store priority value in sql table, as in the order of ListBox.
as follow:
When I clicked Submit button, data will be stored like below;
Sql Table1:
id | column1 | column2 | column3 | priority |
1 | text1 | text2 | item1 | 1 |
2 | text1 | text2 | item2 | 2 |
3 | text1 | text2 | item3 | 3 |
Next Time, when inserted new item values data...
Sql Table1
id | column1 | column2 | column3 | priority |
1 | text1 | text2 | item1 | 1 |
2 | text1 | text2 | item2 | 2 |
3 | text1 | text2 | item3 | 3 |
4 | text1 | text2 | item1 | 1 |
5 | text1 | text2 | item2 | 2 |
5 | text1 | text2 | item3 | 3 |
How I have to do?
I am using VS 2005 in C#. I am developing web project.
Thank in advance.
|
|
|
|
|
Its really simple. You have to put the insert code into a loop. From your description, suppose your list-box has 5 items. then you can make code like this
for(int i=0;i
|
|
|
|
|
Build datatable in code behind.Add all rows to the datatable. Then use sqlbulkcopy.It inserts all the records into database table in one shot.
SqlConnection destinationConnection = new SqlConnection(strConnection);
destinationConnection.Open();
SqlBulkCopy bulkCopy = new SqlBulkCopy(destinationConnection );
bulkCopy.DestinationTableName = "destination";
bulkCopy.WriteToServer(yourDatatable);
destinationConnection .Close();
Rams.Ch
|
|
|
|
|
Hi, I have applied for an entry-level job. I've been sent the following email and I have to program it before I can get an interview. I graduated in 2007 and have forgotten a lot, so have been teaching myself programming languages again recently.
Candidates are required to build an ASP.NET application, using C#.Net for code behind and targeting version 3.5 of the framework. The application will require a SQL server database for storage of data generated by the application. This application must perform the following tasks:
1. Allow the user to enter numbers, of any integer value and in random order. Sort these numbers in either ascending or descending order – the order should be chosen by the user.
2. The ordered sequence should be inserted into a database record along with the direction that the sequence was sorted in and the time taken to perform the sort.
3. Standard .Net controls should be used to bind to the newly inserted record and display the results of the ordering.
4. Again using standard .Net controls the results of all sorts should be available for display in either ascending or descending order of time taken and exportable as XML.
5. Use the design template provided to style your application.
6. Please document all assumptions and decisions taken separately and submit with final code base.
-------------------------
For 1: I have 6 text boxes the user will type numbers in to and a drop down list for them to select ascending or descending. When they click a button, all the numbers go into an array, it is sorted in the required order, and then the numbers will be output into the text boxes in the correct order - is this how you would do this?
I think I know how to add it to the database. The one part I'm stumped on is in part 2: How do I get the time taken to perform the sort? Do I use a Timer control? If so, how many decimal places would you use? 3 or 4? Or much more?
Thanks in advance for any help 
modified 17-Dec-11 16:09pm.
|
|
|
|
|
I remember an array.reverse or something to sort
before sort, get the time stamp, when done get time stamp, and deduct the time using time difference.
That's a good test of skill.
|
|
|
|
|
Yep, for the sorting I used Array.Sort(myArray) for ascending. I did the same for descending with Array.Reverse(myArray) afterwards.
How do I do a timestamp? I've never worked with timers before in C# - only in VB and even then it was a very basic thing that counted up in seconds.
Could someone give me some code which times the sort and puts the amount of time into a float or double variable?
I've googled it and found QueryPerfCounter(). Is that what I need to use?
Thanks.
EDIT: I now have the following code:
var start = DateTime.now;
//code here which I am timing
int i = DateTime.Now.Subtract(start).Milliseconds;
TextBox1.Text = Convert.ToString(i);
The last line is just so I can test the answer I get. And I keep getting zero! I guess thats because I'm only measuring hours, minutes and seconds - not milliseconds. Can someone help?
modified 18-Dec-11 8:56am.
|
|
|
|