Click here to Skip to main content
14,976,527 members

Comments by RakeshMeena (Top 142 by date)

RakeshMeena 15-Jul-11 2:52am View
   
Can you please post your exact problem!
RakeshMeena 15-Jul-11 2:51am View
   
What is it that you want to achieve here?
RakeshMeena 15-Jul-11 2:49am View
   
My 5 SA!
RakeshMeena 3-Jul-11 23:54pm View
   
Thanks SA!
RakeshMeena 1-Jul-11 2:17am View
   
Prerak is right! You need to move the Random instantiation outside the loop.
RakeshMeena 30-Jun-11 7:16am View
   
Answer updated!!
RakeshMeena 30-Jun-11 0:44am View
   
Updated to break out of each loop when required index is found.
RakeshMeena 29-Jun-11 1:32am View
   
My 5 Vivek!
RakeshMeena 28-Jun-11 1:55am View
   
My 5!
RakeshMeena 28-Jun-11 1:16am View
   
My 5 SA!
RakeshMeena 27-Jun-11 1:22am View
   
Deleted
This might be good for academic purpose but not of any practical use (none I could think of), further as EdMan196 pointed out I doubt this code on performance front.
RakeshMeena 27-Jun-11 1:18am View
   
Deleted
I think this will be slower compared to the string.Join method. For such a simple & trivial task I would rather prefer to go with the conventional string.Join method. But anyways a nice tip for LINQ enthusiasts.
RakeshMeena 24-Jun-11 4:29am View
   
I know he/she is clueless and that's the reason I asked for details!
RakeshMeena 24-Jun-11 2:45am View
   
My 5!
RakeshMeena 24-Jun-11 2:34am View
   
My 5!
RakeshMeena 24-Jun-11 2:10am View
   
If you can post the code as well!
RakeshMeena 24-Jun-11 1:39am View
   
Correct, My 5!....
RakeshMeena 23-Jun-11 5:45am View
   
Got it! If you can also share the complete javascript function and the event on which you are calling that function (as I asked earlier as well).
RakeshMeena 23-Jun-11 3:42am View
   
Which popup? I believe query was for setting focus only! Can you please share the complete javascript function and also mention that on which event you are calling that function!
RakeshMeena 23-Jun-11 2:06am View
   
I don't understand why somebody downvoted the question. My 5!
RakeshMeena 22-Jun-11 2:02am View
   
That means you are saving each product one by one?
If no then also it won't make a difference, you just need to keep your foreach loop inside the transactionscope.
If yes I would suggest that you save all the products at a once by converting the list of products into an xml and then passing it to the SP. There are plenty of examples that can help you in this regard, one of them is this.
RakeshMeena 22-Jun-11 1:13am View
   
My 5! Agree there is nothing like Google when it comes to simple queries like this one....
RakeshMeena 22-Jun-11 1:03am View
   
WinForms or ASP.Net??? A lot depends on what kind of application you are trying to build.
RakeshMeena 21-Jun-11 3:52am View
   
Give it a try! I'm not 100% sure but it should work..... If it doesn't get the appropriate (version) of the plugin.
RakeshMeena 21-Jun-11 0:43am View
   
Deleted
Thanks Riz!
RakeshMeena 21-Jun-11 0:22am View
   
Correct! fully agree and here is my 5
RakeshMeena 21-Jun-11 0:18am View
   
Post if you have tried something, we'll be able to help you better that way.
RakeshMeena 20-Jun-11 1:10am View
   
Right answer! My 5
RakeshMeena 17-Jun-11 3:52am View
   
I don't think there is a "Replace" method in C#, yes there is "String.Replace" but no Replace. What language you are using?
RakeshMeena 17-Jun-11 0:43am View
   
My 5! Agree with you as I think this is a better way to access Master page controls.
RakeshMeena 17-Jun-11 0:41am View
   
This won't work as the collection is read-only. This might throw "NotSupported" exception.
RakeshMeena 17-Jun-11 0:38am View
   
Correct! My 5
RakeshMeena 17-Jun-11 0:26am View
   
What is the exact problem? Your control is not showing up or what?
RakeshMeena 17-Jun-11 0:18am View
   
Agree with you! My 5
RakeshMeena 17-Jun-11 0:15am View
   
Correct! My 5
RakeshMeena 16-Jun-11 9:19am View
   
How it is irrelevant to the context? I've just suggest him to use a better tool.

What if somebody asks you "how I can fly a bicycle?" You gonna suggest him to put a jet engine and wings to it OR you gonna point him to a flying machine instead?

I believe you wanted to post something so you did.... Think before you say/write (especially on net).
RakeshMeena 16-Jun-11 7:01am View
   
Is this all? Where is the rest of the markup & code-behind? And when you say "no binding" do you mean that items are added statically(in the markup)? I believe you have something very basic screwed up in your code....
RakeshMeena 16-Jun-11 6:52am View
   
Can you post your markup and code-behind.
RakeshMeena 16-Jun-11 6:43am View
   
Why are you taking the value in a label then using it do the comparison. I mean how does it help apart from the fact that you are using SelectedValue not SelectedIndex.
RakeshMeena 16-Jun-11 6:41am View
   
Yes, but SelectedIndex will always give you an integer value (index of the selected item) not a string (value/text) as Anele is trying to use.
RakeshMeena 16-Jun-11 6:39am View
   
So as of now where you are putting this code? I mean which event handler/method? one more thing, are you binding your DDl on each request?
RakeshMeena 16-Jun-11 2:52am View
   
5 from my side as well. You can as well use the static "Compare" method of the DateTime struct.
RakeshMeena 16-Jun-11 1:13am View
   
Deleted
Can you please post some code to show use of the "CreateParams" property.
RakeshMeena 16-Jun-11 0:25am View
   
My 5!
RakeshMeena 16-Jun-11 0:04am View
   
Informative! My 5
RakeshMeena 15-Jun-11 5:12am View
   
Corrected typo!
RakeshMeena 15-Jun-11 5:07am View
   
Updated the solution!
RakeshMeena 15-Jun-11 3:15am View
   
Why are you downvoting? If you have a problem, post it! downvoting ain't gonna serve any purpose.
RakeshMeena 15-Jun-11 2:29am View
   
Any particular reason for downvoting? Or is it just that you got emotional with the replies!
RakeshMeena 14-Jun-11 23:58pm View
   
My 5!
RakeshMeena 14-Jun-11 23:49pm View
   
Thanks Kim!
RakeshMeena 14-Jun-11 7:25am View
   
Thanks!
RakeshMeena 14-Jun-11 6:27am View
   
My 5!
RakeshMeena 14-Jun-11 6:26am View
   
Anything for JQuery :)
RakeshMeena 14-Jun-11 5:21am View
   
Generic list of what?
RakeshMeena 14-Jun-11 5:05am View
   
Thanks! Please mark the question answered.
RakeshMeena 14-Jun-11 5:04am View
   
If you look carefully your button's click event is bound to "Button1_Click1" in the source. Remove that and try!
RakeshMeena 14-Jun-11 4:41am View
   
Please see my updated solution. btw if you have a query you should either post a reply to the solution or modify your question.
RakeshMeena 14-Jun-11 4:35am View
   
My 5!
RakeshMeena 14-Jun-11 4:30am View
   
My 5!
RakeshMeena 14-Jun-11 3:23am View
   
Good one but accessing data like this is not advisable. Consider using SPs?
RakeshMeena 14-Jun-11 1:43am View
   
5 from my side as well!
RakeshMeena 14-Jun-11 1:31am View
   
Nice one.
RakeshMeena 14-Jun-11 1:19am View
   
Can you please post the code.
RakeshMeena 14-Jun-11 1:03am View
   
Bad solution. Reasons:
1. You are considering that all the rows are modified which may not be the case.
2. If you have say 10 rows, are you going to call DB 10 times? BAD.
See my answer.
RakeshMeena 14-Jun-11 0:50am View
   
Did you debug your code?
RakeshMeena 13-Jun-11 7:30am View
   
Please elaborate!
RakeshMeena 13-Jun-11 7:27am View
   
Welcome from India!
RakeshMeena 13-Jun-11 7:25am View
   
Deleted
Nice one, My 5! Thanks....
RakeshMeena 13-Jun-11 7:10am View
   
Thanks Dalek!
RakeshMeena 13-Jun-11 6:57am View
   
My 5!
RakeshMeena 13-Jun-11 6:49am View
   
Do you want to say that IDs are generated (assigned) dynamically?
RakeshMeena 13-Jun-11 6:46am View
   
I think you meant "guys"! A simple typo can change the message you intend to deliver.
RakeshMeena 13-Jun-11 6:44am View
   
May be you should edit your question instead of putting it as solution. Just a suggestion!
RakeshMeena 13-Jun-11 6:27am View
   
Any particular reason you downvoted my answer?
RakeshMeena 13-Jun-11 6:21am View
   
My 5!
RakeshMeena 13-Jun-11 6:08am View
   
My 5!
RakeshMeena 13-Jun-11 5:48am View
   
My 5.... Good one! See my answer for client side handling.
RakeshMeena 12-Jun-11 2:52am View
   
Why would you need something like this? What is your exact requirement?
RakeshMeena 12-Jun-11 2:43am View
   
My mistake. Edited the question.
RakeshMeena 12-Jun-11 2:32am View
   
Well SA I agree with you, but I see there is a Split function with VB.Net and as per documentation, his code looks fine to me...
RakeshMeena 12-Jun-11 2:23am View
   
Deleted
Nice one.... Thanks!
RakeshMeena 12-Jun-11 2:22am View
   
Deleted
My 5!
Totally agree with you.
RakeshMeena 12-Jun-11 2:09am View
   
Deleted
My 5! Can't we do the event-binding at the client side... just wanted to know....
Thanks for the tip anyways....
RakeshMeena 12-Jun-11 2:05am View
   
Deleted
Nice and handy!! Thanks
RakeshMeena 10-Jun-11 5:49am View
   
Further if you wanted clarifications you should have posted it as comment to my answer not as a solution to your question.
RakeshMeena 10-Jun-11 5:48am View
   
Consider using ListView control, there you can create templates to show your data. So if you want to edit the values, you can use a textbox in the template.
OR If you are hellbent on using GridView only this link might be of some help.
RakeshMeena 10-Jun-11 4:14am View
   
If your query is answered, please mark it!
RakeshMeena 10-Jun-11 4:12am View
   
What error you got?
RakeshMeena 10-Jun-11 4:09am View
   
As far as I know the text value will be set on a control which is part of cell ("gvShowProducts.Rows[e.RowIndex].Cells[2]"), though a lot depends on the markup (HTML) you've written. If you debug you can observe this.
You should also try the link provided by Monjurul.
RakeshMeena 10-Jun-11 3:56am View
   
Thanks!
RakeshMeena 10-Jun-11 3:54am View
   
I commented because you said "Can Any One Try this and give a solution?"... Anyways try my answer, that might help you, if not please post the issue. We'll try to resolve it.
RakeshMeena 10-Jun-11 3:33am View
   
Why anybody else should try this? BAD..... You try and post the challenge that you face.
RakeshMeena 10-Jun-11 3:08am View
   
My 5! Best solution, but if you don't want to modify your query then see my answer.
RakeshMeena 10-Jun-11 0:34am View
   
My 5!
RakeshMeena 9-Jun-11 23:07pm View
   
Thanks!
RakeshMeena 9-Jun-11 23:07pm View
   
May I know the reason why my answer is downvoted. I'm trying to help here and this is what I get in return. Sick of you guys
RakeshMeena 9-Jun-11 6:36am View
   
Are you looking for somebody to do it for you? Please try something and then if you are stuck, people will be able to help you better.
RakeshMeena 9-Jun-11 6:16am View
   
My 5!
RakeshMeena 9-Jun-11 6:14am View
   
What if the user modify the details and then click the button again? Do you still want to show the message?
RakeshMeena 9-Jun-11 5:41am View
   
Nop! Solutions are still available but a bit complex.
There are 2 ways you can paste in a textbox:
1. Ctrl + V : This is already disabled (because of original solution), so no problem.
2. Mouse right click and paste: Here we can handle MouseDown event and if the right button is clicked, save the textbox's text in a variable. Then on the TextChanged event, check if the text contains only numbers or not, if not previous value can be restored.

Hope that helps.
RakeshMeena 9-Jun-11 5:26am View
   
Do you want to show all the logged in users or the user who have visited your site?
RakeshMeena 9-Jun-11 5:15am View
   
I've seen a lot many developers doing this. My 5 for pointing it out.
RakeshMeena 9-Jun-11 4:42am View
   
My 5! Though you don't need to put both If and else parts.
RakeshMeena 9-Jun-11 4:14am View
   
Can you please be more specific.
RakeshMeena 9-Jun-11 3:59am View
   
The code is adding checked items (checkboxes) only since we are setting "Selected" property. Please try and let me know the issue (in detail).
RakeshMeena 9-Jun-11 3:51am View
   
No issues. Thanks anyways.
RakeshMeena 9-Jun-11 3:40am View
   
Sir! It's not CheckedListBox as you said. As the Anjutlya said this is a CheckBoxList.
Further the control you are mentioning is part of WinForms not asp.net (the question is tagged to ASP.net).
Don't be in hurry to downvote somebody just because they have different views.
RakeshMeena 9-Jun-11 3:32am View
   
Please see my updated answer.
RakeshMeena 9-Jun-11 3:11am View
   
My 5. Totally agree with you.
For all who face code issues, just try something yourself first because till you don't try, you are not going to learn/understand anything.
RakeshMeena 9-Jun-11 2:09am View
   
Not a problem but you should make up for that.....
Anyways try the above piece of code and let me know if it works.
RakeshMeena 9-Jun-11 2:08am View
   
I don't think there is a "Yes/No" datatype in Sql Server. It must be a bit, for that you need to modify your code to something like this: string sql = " UPDATE resperson SET kfri = '" + (rb1.Checked)?1:0 +"' WHERE resid = '" + tbrid.Text + " ' ";
RakeshMeena 9-Jun-11 2:04am View
   
If you are down voting, put the reason as well.... This is not good as you are asking for help not doing favor to anybody.
RakeshMeena 8-Jun-11 23:00pm View
   
My 5!
RakeshMeena 8-Jun-11 5:59am View
   
5 from my side as well!!
RakeshMeena 8-Jun-11 5:53am View
   
Are you sitting behind a proxy?
RakeshMeena 8-Jun-11 5:12am View
   
Tag it to SSRS.
RakeshMeena 8-Jun-11 5:06am View
   
encrypt database or data?
RakeshMeena 7-Jun-11 23:03pm View
   
You want code? Why don't you google for it. The questions is very vague. please try something and then if you are stuck, post that problem.
RakeshMeena 7-Jun-11 7:57am View
   
I believe you want to check as to which radio button is selected (to decide the validation).
You can below piece of JQuery to get all the selected radio buttons under a RadioButtonList: "$("#RadioBtn input[type='radio']:checked")".
You can query value property of each of these radio buttons for your logic.
RakeshMeena 7-Jun-11 4:18am View
   
Got your problem..... it's all messed up.... There are multiple problems:
1. "document.getElementById("RadioBtn").checked" is undefined as I said there is no property like this with RadioButtonList.
2. Your original questions says that you want alert when the uncheck is made but how a button is serving this purpose?
RakeshMeena 7-Jun-11 1:31am View
   
My 5!!! I missed the point otherwise this is a better solution.
RakeshMeena 7-Jun-11 0:13am View
   
Can you post what you have tried till now.
RakeshMeena 6-Jun-11 8:07am View
   
5 from my side too!!!
Fully agree with Mark that you can't post answers to all possible scenarios at once. Question should clearly mention what you are looking for.
RakeshMeena 6-Jun-11 5:24am View
   
I'm not sure if you can do this. But you might want to give "Visual Studio SDK" a try.
RakeshMeena 3-Jun-11 7:44am View
   
pretty straight forward you have the property "Form.Text" just set it, what's the issue. Please be specific!
RakeshMeena 3-Jun-11 7:32am View
   
There can be n number of combination to junk text, so are you suggesting that we need to write those many "if" statements? I would say "Bad Coding"!
RakeshMeena 3-Jun-11 7:25am View
   
My 5. Nice solution, I implemented something like this in one of my previous assignments. Thanks!
RakeshMeena 3-Jun-11 7:18am View
   
I remember you posted similar questions earlier also. It's not always feasible to code for all the probable situations. You might want to educate the user to properly enter the search criteria.
RakeshMeena 3-Jun-11 4:49am View
   
What have you tried till now? Please post!
RakeshMeena 3-Jun-11 4:32am View
   
What is this? Why are you pasting an entire page (from MSDN), could have provided URL only......
RakeshMeena 3-Jun-11 1:57am View
   
Addition of table will not affect the data display since the table is appended at the last and only Dataset's first table data will be shown in the grid by default. Anyways your's is an optimized solution, hence my 5.

Tomwa you probably need to look at your xml file and it's path.
RakeshMeena 1-Jun-11 8:00am View
   
Why do you post same question multiple times?
RakeshMeena 1-Jun-11 7:56am View
   
The first link should be sufficient....
RakeshMeena 1-Jun-11 6:36am View
   
Yes you are correct. My mistake. But to get a control at nth level would require good amt of logic. So I think at the time of writing code, the developer should be well aware of the containers he would be looking in and code accordingly.

For the down-voter: Before downvoting you should post your problem/issue in detail. It's SICK!!!
RakeshMeena 1-Jun-11 6:26am View
   
Can you just post the line where you are getting this error.
RakeshMeena 1-Jun-11 6:16am View
   
thanks!
RakeshMeena 1-Jun-11 6:16am View
   
what error/issue you are getting?
RakeshMeena 1-Jun-11 5:51am View
   
Why to postback just to show/hide a control (textbox here)? Javascript would do it...
RakeshMeena 30-May-11 5:14am View
   
Did you try JQuery?
RakeshMeena 27-May-11 2:55am View
   
Below is the LINQ code for your problem:

from cust in customers
where cust.Addresses.Exists(add => add.City == "Test Value")
select cust;

Here "customers" is the item collection.
RakeshMeena 26-May-11 4:18am View
   
Can you post the markup.... As the error description says, you might be having multiple "form" controls inside your page markup or you are adding extra "form" control in the code-behind.