Click here to Skip to main content

Comments by piyush_singh (Top 11 by date)

piyush_singh at 5-Dec-13 8:27am View
   
If the value of the dropdownlist is not affected by postback, then you should definitely set its datasource only once inside the !ISPostBack. Now since, on each postback, the whole page is rendered, you need to store your custom values (such as Dictionary in this case) somewhere. That's where comes, Sessions & ViewStates. If you want to persist your data across multiple pages then, use Session. If you want to hold the value as long as the current page is active then, use ViewState. So that the values will be cleared when the user navigates to some other pages. Since session variables remains active as long as the current session is active it is usually advised not to keep heavy objects in it as it will slow down your application.
piyush_singh at 5-Dec-13 8:05am View
   
You can easily achieve it using javascript.
piyush_singh at 27-Nov-13 6:22am View
   
I think you should confirm whether the connection string is correct or not.
piyush_singh at 25-Sep-13 1:55am View
   
Sorry, I didn't get it this time. If you say that its working, then the problem is solved right?? Otherwise, if, your alert message is fixed, then you can use the OnClientClick property for a button (or any other asp control) to fire the alert box.
piyush_singh at 24-Sep-13 5:45am View
   
First check in the first line, are you getting any rows for the table, dtChanged. Because if there are no rows then, your foreach loop will not be executed. Secondly, what is the error, that you are getting when running this code. Thirdly, inside the foreach loop, you're twice checking the value of drChanged["Choosen"], which is unnecessary.
piyush_singh at 23-Sep-13 9:07am View
   
In asp.net if you would add a control dynamically then, you will not get its value on postback. Once a Page is PostBack, SaveStateComplete event is raised after values of all the controls will be saved in the ViewState, which will conveniently ignore your label as it was added after the Page was rendered. And hence on Page load, you will get a new label. I would suggest, that if the no. of Labels are fixed, then simply change their visibility using css. It will be much simpler to implement.
piyush_singh at 23-Sep-13 7:59am View
   
Google the keyword LinqToSql and you will get thousands of articles. As a matter of fact you should also search the content on Code Project. First of all learn a technology before posting queries/question. Do some R&D.
piyush_singh at 3-Jul-13 8:24am View
   
I am assuming the Column Header that you're clicking has the text "Delete". But what I would like to know is that if you're using a button in gridview to fire the delete query then why not use the Row_Deleting event? In that way your application need not have to check on each cell click whether it's a delete event or not. The delete query will only be fired when the user clicks on the delete button. You can also put your javascript confirmation to that delete button.
piyush_singh at 3-Jul-13 8:07am View
   
Your question needs to be little more descriptive.
piyush_singh at 17-Jun-13 10:20am View
   
It is for this I decided initially to go for the Array of Streams where an index of an array represents a single file only. Along with that the 1st index of the Array will contain the Stream of a comma delimited String data type which will contain the physical location of each file so that at the time of parsing, i will read a files path (including it's name) from the string and subsequently the file will be parsed by another application. Still not very sure whether it will work or not. Thanks for the advice anyways.
piyush_singh at 13-Aug-12 3:42am View
   
Like I mentioned in my question above, that the problem is not to send an email but to stop gmail/yahoo from treating the image as an attachment. The images are properly appearing inside the body it's just that they are also marked as attachment which I don't want to do.

Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid