Click here to Skip to main content
15,393,377 members

Comments by Snesh Prajapati (Top 160 by date)

Snesh Prajapati 23-Dec-16 4:14am View
What is the framework: ASP.NET WebForm or WPF or WinForms ?
Snesh Prajapati 26-Feb-16 20:38pm View
Most Welcome...actually I wanted to say "ditto" [ ] ......and obviously the answer deserve rating 5.
Snesh Prajapati 26-Feb-16 19:46pm View
+1 ...well said.
Snesh Prajapati 14-Dec-15 6:57am View
Try the same as explained at and If issue is still persisting then let us know by sharing your code.
Snesh Prajapati 14-Dec-15 6:51am View
Please have a look at
Snesh Prajapati 10-Dec-15 1:36am View
Nice to hear...Thanks for update.
Snesh Prajapati 8-Dec-15 21:26pm View
Most Welcome !!
Snesh Prajapati 8-Dec-15 11:32am View
The error is because of same method name. You have to decorate first one with [HttpGet] where no parameter is given and [HttpPost] where u are passing customer.
Or if both are HttpGet only then use ActionName attribute.
Or some trick as described at
Snesh Prajapati 8-Dec-15 4:17am View
Is it resolved by the answer given by Mario ? or you want something else ?
Snesh Prajapati 8-Dec-15 2:24am View
Thanks. I hope that will be helpful for inquirer.
Snesh Prajapati 8-Dec-15 1:44am View
+1 @Sergey
Snesh Prajapati 4-Dec-15 18:30pm View
I have updated below answer with more precise data and links. Hope That will be more helpful. Thanks.
Snesh Prajapati 3-Dec-15 0:48am View
In ajax method, you are using type:"POST" but you are not posting any data to GetData method. Verify in code whether you are making "GET" or "POST" call. Have a look at
Snesh Prajapati 3-Dec-15 0:31am View
As Amit has suggested in comment that code also will work.
Snesh Prajapati 25-Nov-15 5:28am View
Could you please write code snippet that you have written to achieve the same. That will help us in understanding the issue.
Snesh Prajapati 24-Nov-15 2:18am View
I hope it would be YYYY-MM ? .....if so please correct typo in question. Thanks.
Snesh Prajapati 19-Nov-15 10:01am View
You are most welcome.
Snesh Prajapati 6-Nov-15 7:27am View
Could you please let us know what code you have written to achieve the same?
Snesh Prajapati 4-Nov-15 7:26am View
Try by changing url like. url: '/VehiclesController/GetVehiclePart/' + vehicle and type as 'POST'
Snesh Prajapati 1-Nov-15 20:09pm View
That would be unique ID for each item, so that we can distinguish and update right image.
Snesh Prajapati 26-Oct-15 22:44pm View
What you are are doing to make it dynamic ? ... and why the code is like:
IF ( combobox1.SelectedItem.ToString() == "Item 1" && Combobox1.SelectedItem == null && Combobox3.SelectedItem == null)
//Do Something
So what if in combobox1...user selects Item2 ? ....I am sure that combobox1 should be having more items ?
Snesh Prajapati 26-Oct-15 22:23pm View
Thanks. ....I am not very clear about ..."//Do Something" .....I hope you are just calling Stored procedure there. If some value is null at C# code...send it as it is and described here:


If you are not doing anything special if some value is null in C#,....just send null to DB and handle null there to ignore that parameter in query.
Snesh Prajapati 5-Feb-15 3:44am View
Those are unit-less and meant only for comparison purposes against other alternatives:
Snesh Prajapati 4-Feb-15 1:29am View
Welcome :-)
Snesh Prajapati 29-Jan-15 2:02am View
It may vary little based on VPS used...but in VPS you can have IIS and host service in same way. Thanks.
Snesh Prajapati 28-Jan-15 7:51am View
Nice. Thanks.
Snesh Prajapati 28-Jan-15 7:13am View
Got it....will think and re-write my query.
Snesh Prajapati 28-Jan-15 5:52am View
Hi Arjun, You have to work under the constraints given while using an API...It depends what they allowed for API to accept. Similar Issue is faced here too:

Snesh Prajapati 17-Jan-15 13:09pm View
I have updated my answer here with few articles explaining same concepts. If you have any specific question...please let us know (by asking new question) will help. Thanks.
Snesh Prajapati 17-Jan-15 12:44pm View
Hi Ashwin, please request to Syed for the same. Below is his profile.
Snesh Prajapati 17-Jan-15 12:39pm View
I have update the answer with reason. Thanks.
Snesh Prajapati 16-Jan-15 5:10am View
It seems you are trying to connect oracle DB...right ? Can you tell us about code where this error is there ?
Snesh Prajapati 14-Jan-15 6:33am View
For Method "NSDateToDateTime" use return type as`DateTime?` can return null value. As you are doing for nullable version of DateTimeToNSDate, handle issue of exceptions in same way.
Snesh Prajapati 14-Jan-15 6:07am View
Welcome....Method "NSDateToDateTime" is written twice as you can not do overloading just by giving different return type (As you are doing in this case)( and if NSDate is a reference type, there is no need to create different extension method.
Snesh Prajapati 13-Jan-15 3:57am View
Snesh Prajapati 13-Jan-15 3:22am View
One more useful link:
Snesh Prajapati 13-Jan-15 3:20am View
In that case..what if you use fully qualified names. If the term "fully qualified name" is new to you....please have a look on
Snesh Prajapati 2-Jan-15 6:22am View
It seems "FineLimt" spelling is wrong....first try small select queries then combine them...Check for if any CASTING needed. Thanks.
Snesh Prajapati 2-Jan-15 6:21am View
Select (DATEDIFF(day, GETDATE(), ReturnDate) * (select top (1) FineLimit from tbl_LibryMemberCategory))
Snesh Prajapati 2-Jan-15 6:13am View
Is that all working fine now ? or what is error now ?
Snesh Prajapati 2-Jan-15 6:06am View
Hi krisna...I have updated the question...please check if you need the same only...or make it more clear. Thanks.
Snesh Prajapati 1-Jan-15 22:00pm View
Most welcome. :-)
Snesh Prajapati 1-Jan-15 12:18pm View
Well said. Thanks.
Snesh Prajapati 31-Dec-14 7:58am View
I am not sure...need to look for it. Thanks.
Snesh Prajapati 31-Dec-14 7:32am View
Have a look for different resource scenario here:
Snesh Prajapati 31-Dec-14 4:26am View
the better use "for" loop based on backplanes.Count. I will provide the code in solution.
Snesh Prajapati 31-Dec-14 4:19am View
I undated the solution....that will keep removing first element of existing list.
Snesh Prajapati 31-Dec-14 4:06am View
what you want to do by doing that minus operation ?
Snesh Prajapati 31-Dec-14 2:30am View
Thanks for update...please check if below links can help:
Snesh Prajapati 31-Dec-14 0:51am View
It seems you downvoted above answer...if yes..then you probably should not downvote any answer without deliberate condiderations. Thanks.
Snesh Prajapati 31-Dec-14 0:40am View
You are right..I update my answer by adding more specific words. Thanks.
Snesh Prajapati 31-Dec-14 0:28am View
I am writing in my first sentence of above answer "knowing two coordinates of its surface and its radius"...I do not understand what you are trying to say here.
Snesh Prajapati 30-Dec-14 22:05pm View
I just update to MM...and verified in a console app. I updated the answer too. Hope it will help you.
Snesh Prajapati 12-Dec-14 5:26am View
I got it. Thanks. I will let you know if get solution for this.
Snesh Prajapati 12-Dec-14 4:53am View
So it is about optimization the process for large data...can you please let us know if there any specific issue you are faceing while doing this. Thanks.
Snesh Prajapati 12-Dec-14 3:31am View
Thanks :)
Snesh Prajapati 9-Dec-14 6:25am View
You are most welcome :-)
Snesh Prajapati 11-Nov-14 3:33am View
Most Welcome...A method having asynchronous behaviours must be marked with async keyword. As far as pure asynchrony is concerned in C#, we can achieve that by using delegate or events too. Such different models are described here: Thanks.
Snesh Prajapati 27-Oct-14 12:58pm View
Let us know if the new code given.....solves your issue.
Snesh Prajapati 27-Oct-14 12:54pm View
It seems you want to put cursor inside the text box when user hover the mouse over that text box...right ? if it is so I have added such code in answer.
Snesh Prajapati 25-Oct-14 0:53am View
As you wrote "I am 53 years-old and my classmates are just out of high school" seems it is 13....right ? I have shared few links to start with in my answer below.
Snesh Prajapati 23-Oct-14 12:44pm View
You can see the line -> data: { courseName: selectedCourseName },
Snesh Prajapati 23-Oct-14 12:43pm View is:
function getFacultyTable() {
// Get Faculty PartialView
url: "/Home/FacultiesToPVDemo",
type: 'Get',
data: { courseName: selectedCourseName },
success: function (data) {
error: function () {
alert("something seems wrong");
Snesh Prajapati 12-Oct-14 2:32am View
It seems you got the solution with below answer :-)
Snesh Prajapati 15-Sep-14 2:20am View
On click of any column in table, you want to get the value of last column?
Snesh Prajapati 13-Sep-14 5:16am View
Great...Thanks Sandeep :-)
Snesh Prajapati 1-Sep-14 5:14am View
I hope you would be able to see "OK" button in dialogue box not <asp:Button ID="Button1" runat="server" Text="Button" style = "display:none" OnClick = "Button1_Click" />. button is having text "Button" which will not be visible in dialogue box. First access this server side button in your dialogue box then go ahead..
Snesh Prajapati 27-Aug-14 8:44am View
Where is span tag?
Snesh Prajapati 25-Aug-14 9:23am View
I am not sure why you are designing like that. I have written as example on CRUD with MVC and jQuery with different approach at ....Hope that would be useful....if not then explain your scenario in detail and put some more code (client and server side) in question itself. Thanks.
Snesh Prajapati 19-Aug-14 5:08am View
On Drop-down selection, what you are writing to display the selected value on partial view?
Snesh Prajapati 18-Aug-14 13:31pm View
Most Welcome !! use multiple layout pages and write logic in _ViewStart file, for more..
Snesh Prajapati 18-Aug-14 12:12pm View
I have added two links having similar issue in answer above...hope those will help you.
Snesh Prajapati 18-Aug-14 10:21am View
Let me know if my answer works for you. Thanks.
Snesh Prajapati 18-Aug-14 9:52am View
Thanks for update !!
Snesh Prajapati 18-Aug-14 9:22am View
Is your code working now or not ?
Snesh Prajapati 18-Aug-14 9:19am View
Can u please update us ....what worked and mark those as answer. Thanks.
Snesh Prajapati 18-Aug-14 7:35am View
Help me to understand are having two win forms...on clicking on first button on first want to display second form? ...or what do you mean by "call a button"....Is that mean firing on click event of second button in second form ?
Snesh Prajapati 12-Aug-14 8:18am View
Did you check that call is reaching to deleteData and deleteData1 function ?
Snesh Prajapati 26-Jun-14 1:19am View
try to run Visual Studio as Administrator by right clicking on its exe or link in start menu. Let me know if it works.
Snesh Prajapati 26-Jun-14 1:06am View
Please have a look at for a real time example. Thanks.
Snesh Prajapati 26-Jun-14 0:59am View
When you create a is extremely important that you identify exactly what dependencies your application requires, and their versions. You must provide details of the dependencies in metadata of DLL or in read me file (instructions/ how to use). This is how people do in general.
Snesh Prajapati 20-Jun-14 4:57am View
What kind of validation you want to do on textbox to search record?
Snesh Prajapati 20-Jun-14 0:21am View
Thanks Tadit ! It is so cool to see your comment with 5 !! :)
Snesh Prajapati 19-Jun-14 9:03am View
As you are saying "when their is other text or code then it fails to display the image". Can you write that text or code, which is creating the problem ?
Snesh Prajapati 7-Jun-14 8:40am View
What kind of validity you are talking about?
Snesh Prajapati 6-Jun-14 14:01pm View
Superb answer !!
Snesh Prajapati 6-Jun-14 9:57am View
I think, You want to ask something like:
How to get the value all elements which contains same name in javascript?
Is it right?
Snesh Prajapati 29-May-14 23:28pm View
Absolute answer..thanks
Snesh Prajapati 28-May-14 5:17am View
Can you post your code here?
Snesh Prajapati 2-May-14 2:43am View
Can you write your code?
Snesh Prajapati 30-Apr-14 2:37am View
How you want to implement required field validator either using ASP.NET or JavaScript or jQuery?
Snesh Prajapati 29-Apr-14 10:45am View
Most welcome !!
Snesh Prajapati 29-Apr-14 10:10am View
I have added two id d="firsttdClaimOut" and id="secondtdClaimOut" by default set is as style="display:none".
When you select New Claim then using script I am changing the style as display "none" to "block"
Snesh Prajapati 29-Apr-14 10:06am View
Modified script code :
if (txt.match(id2)) {

document.getElementById(id2).style.display = 'block';

document.getElementById("firsttdClaimOut").style.display = 'block';
document.getElementById("secondtdClaimOut").style.display = 'block';
Snesh Prajapati 29-Apr-14 10:04am View
i have modified of your HTML code block as given below:

<td class="title" id="firsttdClaimOut" style="display:none" >Claim Outcome:</td>
<td style="display:none" id="secondtdClaimOut" class="field"><select name="type" önchange="display(this,'Reject');">
<option value=" "> </option>
<option value="Accept">Accept</option>
<option value="Reject">Reject</option>
<option value="Further info">Futher info</option>
Snesh Prajapati 29-Apr-14 9:30am View
Welcome. Good to know that you solved your problem. Sure I will try to solve your next issue.
Snesh Prajapati 29-Apr-14 5:53am View
What I understood that when "Paper" is selected from the Process drop-down just below the Process drop-down you want to add a textbox. Is it right?
Snesh Prajapati 25-Apr-14 5:21am View
As you are saying that it is working sine with input textbox. instead of div you can try with span.
Snesh Prajapati 25-Apr-14 1:35am View
You are most welcome.
Snesh Prajapati 25-Apr-14 1:34am View
Here as a solution I am seeing that you have posted solution. Did you solve your problem?
Snesh Prajapati 24-Apr-14 7:42am View
function ClientSystemDate() {
//var todaydate = new Date();
//var localdate = (todaydate.getMonth() + 1) + '/' + todaydate.getDate() + '/' + todaydate.getFullYear();

var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
var curr_year = d.getFullYear();
curr_date = "dd";
curr_month = "mm";
curr_year = "yyyy";

alert(curr_date + "/" + curr_month + "/" + curr_year);


the above code will return date format like dd/mm/yyyy...Still I am looking for appropriate way to achieve the same. For time being you can use..modify accordingly if required
Snesh Prajapati 24-Apr-14 7:26am View
Thanks. Now I got it. Please wait let me see how to do it.
Snesh Prajapati 24-Apr-14 7:04am View
Sorry in comment tag is not visible. It it same for what you are looking ..
Snesh Prajapati 24-Apr-14 7:02am View
try below code it will give client's system date.
&amp;lt;span id="clientSyatemDate"&amp;gt;This is current local Date Time in JQuery&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;button type="button" önclick="ClientSystemDate()"&amp;gt;GetDate&amp;lt;/button&amp;gt;

&amp;lt;script src="~/Scripts/jquery-1.8.2.min.js"&amp;gt;&amp;lt;/script&amp;gt;function ClientSystemDate() {
var todaydate = new Date();
var localdate = (todaydate.getMonth() + 1) + '/' + todaydate.getDate() + '/' + todaydate.getFullYear();
Here I used jQuery..I want to know are you using jQuery?
Snesh Prajapati 24-Apr-14 6:35am View
You did not write anything about your problem just copied and pasted your code.
Snesh Prajapati 24-Apr-14 6:33am View
Please use proper formatting when you ask any question.
Snesh Prajapati 22-Apr-14 6:52am View
if you are talking about endpoint(tag, where you need to write the address.. of the service) for web service:
Hope it will help you.
Snesh Prajapati 21-Apr-14 2:32am View
Good explanation is given here:
Snesh Prajapati 15-Apr-14 6:28am View
It is just suggestion. Currently ASP.NET MVC5 is available. At least you should you ASP.NET MVC4.
Snesh Prajapati 15-Apr-14 6:21am View
You are most welcome.
Snesh Prajapati 15-Apr-14 2:50am View
You can use password salt as described:
Snesh Prajapati 11-Apr-14 7:26am View
write your controller action code that can help me to find out the problem.
Snesh Prajapati 11-Apr-14 7:25am View
did you created model?
Snesh Prajapati 11-Apr-14 7:02am View
"dropdown list not showing the correct value" I am not getting. are you getting the values or not.
Snesh Prajapati 11-Apr-14 6:19am View
Finally you did it. Sorry due to some work I could not reply. Good Job.
Snesh Prajapati 11-Apr-14 2:36am View
What I understood is happening because all date-picker are having same class name.
Snesh Prajapati 11-Apr-14 2:19am View
Its fine but you have html code that you can write.
Snesh Prajapati 11-Apr-14 2:11am View
I got it your problem..can you write your html code and code what you are writing on date-picker selection change.
Snesh Prajapati 10-Apr-14 8:54am View
Snesh Prajapati 10-Apr-14 7:29am View
Sorry for spelling mistake in id property "chooseColor"
Snesh Prajapati 10-Apr-14 7:27am View
Html code:
<input type="color" id="choseColor">

jQuery Code:
$("#choseColor").change(function () {
var selectedColor = $(this).val();
Snesh Prajapati 10-Apr-14 6:11am View
Can you write the code which you are writing in your model?
Snesh Prajapati 1-Apr-14 5:23am View
onclick event is not working?
Snesh Prajapati 1-Apr-14 2:47am View
You will get a lot of resources on Google. Please use it.
Snesh Prajapati 1-Apr-14 2:43am View
I think you want to say XSS not XXS.
Snesh Prajapati 28-Mar-14 3:27am View
For testing purpose remove the [ActionName("IndexPost")] and change the action method name then check appropriate action is calling or not.
Snesh Prajapati 28-Mar-14 2:41am View
Snesh Prajapati 27-Mar-14 13:26pm View
Welcome !!
Snesh Prajapati 27-Mar-14 9:42am View
Please use code block for representing the code. It would be easy to find out the problem.
Snesh Prajapati 26-Mar-14 7:33am View
Can you write code? It will help to identify the problem.
Snesh Prajapati 26-Mar-14 7:29am View
If you want to achieve the same using JavaScript visit below link:
Snesh Prajapati 26-Mar-14 7:25am View
If you are using jQuery also then you can write as given below:
$(document).ready(function () {
var yourSessionValue = '<%= Session["myValue"] %>';
if (yourSessionValue == 1) {
else {
Snesh Prajapati 26-Mar-14 1:12am View
In you case should be something like:
@Html.ActionLink("Nightflight - Imported files history", "Index", "ImportedDocs", new { area="ImportNightflight"}, null)

If I understand correctly...
The Text you want is : Nightflight - Imported files history
Area Name: ImportNightflight
Controller Name: ImportedDocs
Action Name : Index
.....Otherwise you need to change accordingly.

One more thing....Are you able to access webpages inside area by directly writing URL in Browser (without clicking on Action link) ?
Snesh Prajapati 25-Mar-14 13:48pm View
You need to modify code of your action link as given below:
@Html.ActionLink("DisplayText", "ActionName", "ControllerName", new { area="AreaName"}, null)

For example in my article i put following action in layout page as given below:

@Html.ActionLink("Men", "Index", "Clothing",new { area="Men"},null)
Snesh Prajapati 23-Mar-14 23:32pm View
Most welcome !!
Snesh Prajapati 20-Mar-14 8:43am View
Sorry I don't have much idea about VB.NET.
Snesh Prajapati 20-Mar-14 8:38am View
do you want to use JavaScript or jQuery?
Snesh Prajapati 20-Mar-14 7:57am View
I am saying when page is being rendered in the browser. Right click then you will get an options like View page source.
Snesh Prajapati 14-Mar-14 3:27am View
Can you write the code how are you getting formName,fieldId,pType and finalMsg?
Snesh Prajapati 12-Mar-14 2:15am View
welcome !!
Snesh Prajapati 12-Mar-14 2:15am View
Most welcome. I would prefer to be addressed as Snesh or Mam, not Sir !!
Snesh Prajapati 11-Mar-14 1:32am View
Can you send code so we will come to what you are missing?
Snesh Prajapati 10-Mar-14 6:12am View
most welcome.
Snesh Prajapati 8-Mar-14 10:27am View
Thanks Chill60....I have consolidated answers...and removed others.
Snesh Prajapati 8-Mar-14 10:20am View
Use ADO.NET or Entity Framework to connect to database.
For Entity Framework go to:
Simple Sample with Entity Framework [^]

For ADO.NET please visit :Using ADO.NET for beginners[^]
Snesh Prajapati 8-Mar-14 4:02am View
I will reply in sometime. Thanks.
Snesh Prajapati 8-Mar-14 3:53am View
Thx for confirmation..
Snesh Prajapati 8-Mar-14 3:52am View
put the "/" before your controller name. I used your code and it is working fine.
Snesh Prajapati 6-Mar-14 6:45am View
Do not use:

use style to draw checkbox like:
Snesh Prajapati 6-Mar-14 6:21am View
Confirm me. I will try to solve your problem..
Snesh Prajapati 5-Mar-14 4:47am View
Exactly what is your requirement? Can you explain in detail?
Snesh Prajapati 24-Feb-14 23:38pm View
Most Welcome. Glad to know !!
Snesh Prajapati 24-Feb-14 23:00pm View
There must be some space left while typing...for any attribute or value....just remove that.
Snesh Prajapati 24-Feb-14 7:52am View
@Kishore.. Any update ?
Snesh Prajapati 24-Feb-14 3:30am View
Most welcome.
Snesh Prajapati 24-Feb-14 1:19am View
Any update ?
Snesh Prajapati 24-Feb-14 1:04am View
Then look into Web.Config....for myself I can see like:

add name="DefaultConnection" providername="System.Data.SqlClient" connectionstring="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebApplication1-20140223194834;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-WebApplication1-20140223194834.mdf"

What about you?

The important value is: AttachDBFilename=|DataDirectory|\aspnet-WebApplication1-20140223194834.mdf".....Let me know yours?
Snesh Prajapati 24-Feb-14 0:55am View
Sent a mail to you...Hope the screenshot will solve problem. If still issue persist look into

One more thing....if you just created the ASP.NET application, by default database is not there. The Database will be created only when first time any user would registered.
Snesh Prajapati 24-Feb-14 0:47am View
I can send you screenshot if you are facing problem in getting the option. in that case just share your email.
Snesh Prajapati 24-Feb-14 0:45am View
It may be as hidden file so first use "Show All Files" button in Solution explorer and then look inside App_Data folder.