If you wish to have your button trigger the function you've written in filename.js, you need to modify filename.js so that the code you want to execute is wrapped inside a function. Remember, you can only call a function, not a source file (which lacks an entry point).
For example, if your current filename.js contents are:
You should update it to look like this:
function functionName(){
alert('Hello world');
}
Next, remember to include the filename.js in the header of your HTML page using this line:
<head>
<script type="text/javascript" src="Public/Scripts/filename.js"></script>
</head>
This way, you can now invoke the function from filename.js with your button:
<button onclick="functionName()">Call the function</button>
To demonstrate how this works, I've created a basic example.
An HTML page prompts the user to enter their name, and upon clicking the button, the function within Public/Scripts/filename.js is called with the inputted string as a parameter. This triggers a popup message saying "Hello, <insertedName>!".
Here's the sample HTML page:
<html>
<head>
<script type="text/javascript" src="Public/Scripts/filename.js"></script>
</head>
<body>
What's your name? <input id="insertedName" />
<button onclick="functionName(insertedName.value)">Say hello</button>
</body>
</html>
And here's the content of Public/Scripts/filename.js:
function functionName( s ){
alert('Hello, ' + s + '!');
}