I have made progress in getting closer to a solution to my How can I return a jQuery multiselect result as an array and use it as the comparison data in an MVC Razor page table method's @foreach function? question. I would like to provide an updated code block of what I now have, but am not sure if I should replace the original code block or add it as part of an Update to my question. I didn't see anything in the FAQ that would suggest which way I should go, other than for editing purposes. It is a semi-lengthy code block.
-
20The rule is that your edit should not invalidate any given answer and you shouldn't replace the whole question with a different one. So in your case I don't see a problem with replacing the old code with a new one when you don't need the old code in order to understand the question and to be able to answer it. If you need both, then you should provide both versions. Keep in mind that the users here have no idea about your project, your setup etc. so you should provide any information needed to answer the question. Also stackoverflow.com/help/minimal-reproducible-example might help too.– TomCommented Sep 16, 2020 at 21:18
-
8This would make a great faq question.– shreyasm-devCommented Sep 17, 2020 at 1:01
-
3There is also rule that answers go into answer and not comments... so following rules is not a rule as demonstrated by @Tom :)– Alexei LevenkovCommented Sep 17, 2020 at 2:12
-
1@AlexeiLevenkov - Actually, I don't think there is any such rule. There is a rule that comments should not be posted as answers ... but not the reverse. If there was the reverse rule, then many people would not get any help at all. (But nice joke ...)– Stephen CCommented Sep 17, 2020 at 4:05
-
The current state of your question looks to me as if the code example could still be reduced a bit, but I'm not a Javascript expert, so I may be wrong. Please remember that we want a stackoverflow.com/help/minimal-reproducible-example.– NoDataDumpNoContributionCommented Sep 17, 2020 at 9:42
-
@AlexeiLevenkov My comment wasn't a fully-fledged answer (at least not in my point of view), hence just a comment :).– TomCommented Sep 17, 2020 at 12:29
1 Answer
The rule is that your edit should not invalidate any given answer and you should not replace the whole question with a different one.
So in your case I don't see a problem with replacing the old code with a new version, if you don't need the old code in order to understand the question and to be able to answer it. If you need both, then you should provide both versions. Keep in mind that the users here have no idea about your project, your setup etc., so you should provide any information needed to answer the question.
As always make sure to check the guidance provided in Minimal, Reproducible Example on posting code; don't just copy your current code, but rather carefully select only that part of the code relevant to the question, which should actually demonstrate the problem.
-
@Tom Thanks for the answer. I'll do my best on the Minimal, Reproducible Example; however in this case it is a .cshtml Razor page with a multiselect list and a db table display, both of which are part of the problem, so I don't think I can minimalize it any more. Commented Sep 17, 2020 at 12:36
-
3@SirAsksaLot Are really ALL columns necessary to reproduce your problem? I'm sure you could shrink that down. When I looked at your question, I immediately decided: I'm not going to read this! I could imagine, many others will have similar feelings. It's very important to provide minimal examples. For readability, and - very nice side effect - you often identify the problem yourself, when trying to really reduce/isolate it. Commented Sep 18, 2020 at 8:21
-
2@Tom You're right. Now that I think about it, I could pair it all down to just the Circuit (key) column. Once that is working, the following details should be available from the record retrieved. Thanks again. Commented Sep 18, 2020 at 13:00