Questions




Answers
1
How to get latitude and longitude from address using C# or Javascript?

I have a requirement to get latitude and longitude from address using C# or Javascript, any solution will work. So, how can I get them using address?

Basically, I need to convert the address into Lat / Long and show it in Google maps in ASP.NET MVC web-application, so javascript solution will also work.

Note: I don't have lat/long, just address of the user.

...
Read More
Answers
2
How do I stop from browser being closed when I stop debugging in Visual Studio 2017?

I have recently updated my Visual studio from 2015 to 2017 and started using 2017 now, but when I start debugging in it, it opens website in new browser tab and as soon as I stop debugging it closes the browser tab/website also.

Previously, in Visual Studio 2015, Browser tab never used to get closed as soon as I stop debugging.

So, how i can disable this new feature and keep website open/running even when debugging is stoppped in Visual Studio 2017?

...
Read More
Answers
2
B-Tree Implementation

How do you implement B-Tree in java with a GUI.

I'm new to Java Algorithms and want to know how to implement this data structure in code.

...
Read More
Answers
2
Prevent negative value from being entered in HTML input type number field?

While creating HTML5 input type number in the html form, I would like to disable or prevent user from entering negative number in it, user should be able to enter only positive number, how can i do that, current HTML code is as below

...
Read More
Answers
1
Sum of two column values from two different tables

I want sum of two column values from two different tables, how can I do it using SQL?

Suppose, these are my two tables, Table 1

...
Read More
Answers
2
ASP.NET Web-Form Error "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)."

I have created a new empty ASP.NET web-forms project using Visual Studio, after adding the new .aspx (web-form) file with the RegularExpressionValidator code as shown below, I am getting an error "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)."

Here is the code of my Web-Form page(Default.aspx)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EmailIdValidate.Default" %>

<!DOCTYPE html>
<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "Your email: " + TextBox1.Text.ToString();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Validate email address using RegularExpressionValidator in ASP.NET</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Red">RegularExpressionValidator: email</h2>
        <asp:Label 
             ID="Label1" 
             runat="server"
             Font-Bold="true"
             Font-Italic="true"
             Font-Size="Large"
             ForeColor="SeaGreen"
             >
        </asp:Label>

        <br /><br />
        <asp:Label ID="Label2" runat="server" Text="Email">
        </asp:Label>
        <asp:TextBox  ID="TextBox1" runat="server" >
        </asp:TextBox>

        <asp:RequiredFieldValidator 
             ID="RequiredFieldValidator1"
             runat="server"
             ControlToValidate="TextBox1"
             Text="*"
             >
        </asp:RequiredFieldValidator>

        <asp:RegularExpressionValidator 
            ID="RegularExpressionValidator1"
            runat="server" 
             ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
            ControlToValidate="TextBox1"
            ErrorMessage="Input valid email address!"
            >
        </asp:RegularExpressionValidator>

        <br /><br />
        <asp:Button 
             ID="Button1" 
             runat="server" 
             Text="Submit email"
             Font-Bold="true"
             ForeColor="DodgerBlue" 
             OnClick="Button1_Click"
             />
    </div>
    </form>
</body>
</html>

When building the project and running it browser getting error details as shown below

...

Read More
Answers
1
How do Add class using Javascript?

I wanted to add or remove classes from my HTML <div> dynamically using Javascript, I don't want to use jQuery here, so How can I add a class using JS?

If possible, I would also like to know how can I toggle class in Javascript

...
Read More
Answers
2
How to trigger click on pressing Enter key inside text input using Javascript or jQuery?

How to trigger the click event on the search button, when user press enter key inside text input html, suppose this is my HTML

...
Read More
Answers
3
Cannot find the check box for enabling SSL in visual studio 2017 (ASP.NET Core project)

Hi, I want to enable SSL for my ASP.NET Core project in Visual studio 2017, but when I'm checking my visual studio project to enable SSL, it looks like this in properties

...

Read More
Answers
2
How to add headers before sending Ajax Request using jQuery?

I was trying to add custom headers before sending ajax request to the server (controller in .NET MVC), but I am not able to send it, here is what I am using as of now

...
Read More

Page 18 of 54