How can I extend and add to the IFormFile Interface in .NET Core. Need to append data to the serialised array...
up vote
1
down vote
favorite
I need to upload a file using .net core.
I am using a multipart form and AJAX.
However I have a unique requirement. I need to be able to add data to the serialized array and then bind it to the controller through an ajax POST request and Model Binding.
I need to add an id, which i pass to the controller. Based on the id I decide to which row in a table I save the uploaded file details.
My Controller to which I am Posting:
[HttpPost]
public async Task<IActionResult> File(List<IFormFile> files)
{
long size = files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
string fpath = filePath;
var query = from d in db.TableA
where d.File == null && d.id == id // This is where I need to compare the ID
select d;
foreach (TableA details in query)
{
details.File = filePath;
}
try
{
await db.SaveChangesAsync(); // await needed to hold execution
}
catch (Exception e)
{
Console.WriteLine(e);
}
return RedirectToAction("View");
}
where d.File == null && d.id == id // This is where I need to compare
the ID
Multi Part Form:
<form method="post" id="typea" enctype="multipart/form-data" asp-controller="Main" asp-action="File">
<label class="btn btn-info"> Upload your document <input type="file" name="files" onchange="this.form.submit()" hidden />
</label>
</form>
My Ajax call:
$(document).ready(function () {
$('#typea').click(function () {
event.preventDefault();
var $form = $(this);
var serializedData = $form.serializeArray();
serializedData.push({ name: "ID", value: "typea" });
$.ajax({
url: "Main/File",
type: "POST",
data: serializedData
});
});
My problem is this:
If i push the array I cannot count on IFormFile Interface for model binding.
Can I somehow extend the IFormFIle interface?
Or is there a way I can do it without using the IFormFile.
I tried to write my own model referencing from the IFormFIle interface but could not.
public interface IFormFile
{
string ContentType { get; }
string ContentDisposition { get; }
IHeaderDictionary Headers { get; }
long Length { get; }
string Name { get; }
string FileName { get; }
Stream OpenReadStream();
void CopyTo(Stream target);
Task CopyToAsync(Stream target, CancellationToken cancellationToken = null);
}
I could not use the methods of the interface, which is obvious.
Pointers please :).
jquery asp.net ajax asp.net-core model-binding
add a comment |
up vote
1
down vote
favorite
I need to upload a file using .net core.
I am using a multipart form and AJAX.
However I have a unique requirement. I need to be able to add data to the serialized array and then bind it to the controller through an ajax POST request and Model Binding.
I need to add an id, which i pass to the controller. Based on the id I decide to which row in a table I save the uploaded file details.
My Controller to which I am Posting:
[HttpPost]
public async Task<IActionResult> File(List<IFormFile> files)
{
long size = files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
string fpath = filePath;
var query = from d in db.TableA
where d.File == null && d.id == id // This is where I need to compare the ID
select d;
foreach (TableA details in query)
{
details.File = filePath;
}
try
{
await db.SaveChangesAsync(); // await needed to hold execution
}
catch (Exception e)
{
Console.WriteLine(e);
}
return RedirectToAction("View");
}
where d.File == null && d.id == id // This is where I need to compare
the ID
Multi Part Form:
<form method="post" id="typea" enctype="multipart/form-data" asp-controller="Main" asp-action="File">
<label class="btn btn-info"> Upload your document <input type="file" name="files" onchange="this.form.submit()" hidden />
</label>
</form>
My Ajax call:
$(document).ready(function () {
$('#typea').click(function () {
event.preventDefault();
var $form = $(this);
var serializedData = $form.serializeArray();
serializedData.push({ name: "ID", value: "typea" });
$.ajax({
url: "Main/File",
type: "POST",
data: serializedData
});
});
My problem is this:
If i push the array I cannot count on IFormFile Interface for model binding.
Can I somehow extend the IFormFIle interface?
Or is there a way I can do it without using the IFormFile.
I tried to write my own model referencing from the IFormFIle interface but could not.
public interface IFormFile
{
string ContentType { get; }
string ContentDisposition { get; }
IHeaderDictionary Headers { get; }
long Length { get; }
string Name { get; }
string FileName { get; }
Stream OpenReadStream();
void CopyTo(Stream target);
Task CopyToAsync(Stream target, CancellationToken cancellationToken = null);
}
I could not use the methods of the interface, which is obvious.
Pointers please :).
jquery asp.net ajax asp.net-core model-binding
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I need to upload a file using .net core.
I am using a multipart form and AJAX.
However I have a unique requirement. I need to be able to add data to the serialized array and then bind it to the controller through an ajax POST request and Model Binding.
I need to add an id, which i pass to the controller. Based on the id I decide to which row in a table I save the uploaded file details.
My Controller to which I am Posting:
[HttpPost]
public async Task<IActionResult> File(List<IFormFile> files)
{
long size = files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
string fpath = filePath;
var query = from d in db.TableA
where d.File == null && d.id == id // This is where I need to compare the ID
select d;
foreach (TableA details in query)
{
details.File = filePath;
}
try
{
await db.SaveChangesAsync(); // await needed to hold execution
}
catch (Exception e)
{
Console.WriteLine(e);
}
return RedirectToAction("View");
}
where d.File == null && d.id == id // This is where I need to compare
the ID
Multi Part Form:
<form method="post" id="typea" enctype="multipart/form-data" asp-controller="Main" asp-action="File">
<label class="btn btn-info"> Upload your document <input type="file" name="files" onchange="this.form.submit()" hidden />
</label>
</form>
My Ajax call:
$(document).ready(function () {
$('#typea').click(function () {
event.preventDefault();
var $form = $(this);
var serializedData = $form.serializeArray();
serializedData.push({ name: "ID", value: "typea" });
$.ajax({
url: "Main/File",
type: "POST",
data: serializedData
});
});
My problem is this:
If i push the array I cannot count on IFormFile Interface for model binding.
Can I somehow extend the IFormFIle interface?
Or is there a way I can do it without using the IFormFile.
I tried to write my own model referencing from the IFormFIle interface but could not.
public interface IFormFile
{
string ContentType { get; }
string ContentDisposition { get; }
IHeaderDictionary Headers { get; }
long Length { get; }
string Name { get; }
string FileName { get; }
Stream OpenReadStream();
void CopyTo(Stream target);
Task CopyToAsync(Stream target, CancellationToken cancellationToken = null);
}
I could not use the methods of the interface, which is obvious.
Pointers please :).
jquery asp.net ajax asp.net-core model-binding
I need to upload a file using .net core.
I am using a multipart form and AJAX.
However I have a unique requirement. I need to be able to add data to the serialized array and then bind it to the controller through an ajax POST request and Model Binding.
I need to add an id, which i pass to the controller. Based on the id I decide to which row in a table I save the uploaded file details.
My Controller to which I am Posting:
[HttpPost]
public async Task<IActionResult> File(List<IFormFile> files)
{
long size = files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
string fpath = filePath;
var query = from d in db.TableA
where d.File == null && d.id == id // This is where I need to compare the ID
select d;
foreach (TableA details in query)
{
details.File = filePath;
}
try
{
await db.SaveChangesAsync(); // await needed to hold execution
}
catch (Exception e)
{
Console.WriteLine(e);
}
return RedirectToAction("View");
}
where d.File == null && d.id == id // This is where I need to compare
the ID
Multi Part Form:
<form method="post" id="typea" enctype="multipart/form-data" asp-controller="Main" asp-action="File">
<label class="btn btn-info"> Upload your document <input type="file" name="files" onchange="this.form.submit()" hidden />
</label>
</form>
My Ajax call:
$(document).ready(function () {
$('#typea').click(function () {
event.preventDefault();
var $form = $(this);
var serializedData = $form.serializeArray();
serializedData.push({ name: "ID", value: "typea" });
$.ajax({
url: "Main/File",
type: "POST",
data: serializedData
});
});
My problem is this:
If i push the array I cannot count on IFormFile Interface for model binding.
Can I somehow extend the IFormFIle interface?
Or is there a way I can do it without using the IFormFile.
I tried to write my own model referencing from the IFormFIle interface but could not.
public interface IFormFile
{
string ContentType { get; }
string ContentDisposition { get; }
IHeaderDictionary Headers { get; }
long Length { get; }
string Name { get; }
string FileName { get; }
Stream OpenReadStream();
void CopyTo(Stream target);
Task CopyToAsync(Stream target, CancellationToken cancellationToken = null);
}
I could not use the methods of the interface, which is obvious.
Pointers please :).
jquery asp.net ajax asp.net-core model-binding
jquery asp.net ajax asp.net-core model-binding
asked Nov 18 at 19:31
Abhilash Gopalakrishna
10912
10912
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You don't need to implements (extends) the
IFormFile
interface, a wrapper by composition is preferred over inheritance. Simply create a dummy POCO to hold the information :
public class IFormFilesWrapper{
public string Id {get;set;} // you might change the type to Guid / int /e.t.c
public IList<IFormFile> Files {get;set;}
}
and the action method will be :
[HttpPost]
public async Task<IActionResult> File(IFormFilesWrapper filesWrapper)
{
var id = filesWrapper.Id; // here's the Id posted by client
long size = filesWrapper.Files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in filesWrapper.Files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
// ...
}
As a side note, if I remember correctly, the
$form.serializeArray()
doesn't work well formultipart/form-data
. So I use a plainFormData
to generate the payload :
$(document).ready(function () {
$('#typea>button').click(function () {
event.preventDefault();
var form = document.querySelector("#typea");
var formData = new FormData(form);
formData.append("ID","typea");
var xhr = new XMLHttpRequest();
xhr.open("POST","Main/File");
xhr.send(formData);
});
});
A screenshot :
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the codevar form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
|
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You don't need to implements (extends) the
IFormFile
interface, a wrapper by composition is preferred over inheritance. Simply create a dummy POCO to hold the information :
public class IFormFilesWrapper{
public string Id {get;set;} // you might change the type to Guid / int /e.t.c
public IList<IFormFile> Files {get;set;}
}
and the action method will be :
[HttpPost]
public async Task<IActionResult> File(IFormFilesWrapper filesWrapper)
{
var id = filesWrapper.Id; // here's the Id posted by client
long size = filesWrapper.Files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in filesWrapper.Files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
// ...
}
As a side note, if I remember correctly, the
$form.serializeArray()
doesn't work well formultipart/form-data
. So I use a plainFormData
to generate the payload :
$(document).ready(function () {
$('#typea>button').click(function () {
event.preventDefault();
var form = document.querySelector("#typea");
var formData = new FormData(form);
formData.append("ID","typea");
var xhr = new XMLHttpRequest();
xhr.open("POST","Main/File");
xhr.send(formData);
});
});
A screenshot :
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the codevar form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
|
show 3 more comments
up vote
1
down vote
accepted
You don't need to implements (extends) the
IFormFile
interface, a wrapper by composition is preferred over inheritance. Simply create a dummy POCO to hold the information :
public class IFormFilesWrapper{
public string Id {get;set;} // you might change the type to Guid / int /e.t.c
public IList<IFormFile> Files {get;set;}
}
and the action method will be :
[HttpPost]
public async Task<IActionResult> File(IFormFilesWrapper filesWrapper)
{
var id = filesWrapper.Id; // here's the Id posted by client
long size = filesWrapper.Files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in filesWrapper.Files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
// ...
}
As a side note, if I remember correctly, the
$form.serializeArray()
doesn't work well formultipart/form-data
. So I use a plainFormData
to generate the payload :
$(document).ready(function () {
$('#typea>button').click(function () {
event.preventDefault();
var form = document.querySelector("#typea");
var formData = new FormData(form);
formData.append("ID","typea");
var xhr = new XMLHttpRequest();
xhr.open("POST","Main/File");
xhr.send(formData);
});
});
A screenshot :
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the codevar form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
|
show 3 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You don't need to implements (extends) the
IFormFile
interface, a wrapper by composition is preferred over inheritance. Simply create a dummy POCO to hold the information :
public class IFormFilesWrapper{
public string Id {get;set;} // you might change the type to Guid / int /e.t.c
public IList<IFormFile> Files {get;set;}
}
and the action method will be :
[HttpPost]
public async Task<IActionResult> File(IFormFilesWrapper filesWrapper)
{
var id = filesWrapper.Id; // here's the Id posted by client
long size = filesWrapper.Files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in filesWrapper.Files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
// ...
}
As a side note, if I remember correctly, the
$form.serializeArray()
doesn't work well formultipart/form-data
. So I use a plainFormData
to generate the payload :
$(document).ready(function () {
$('#typea>button').click(function () {
event.preventDefault();
var form = document.querySelector("#typea");
var formData = new FormData(form);
formData.append("ID","typea");
var xhr = new XMLHttpRequest();
xhr.open("POST","Main/File");
xhr.send(formData);
});
});
A screenshot :
You don't need to implements (extends) the
IFormFile
interface, a wrapper by composition is preferred over inheritance. Simply create a dummy POCO to hold the information :
public class IFormFilesWrapper{
public string Id {get;set;} // you might change the type to Guid / int /e.t.c
public IList<IFormFile> Files {get;set;}
}
and the action method will be :
[HttpPost]
public async Task<IActionResult> File(IFormFilesWrapper filesWrapper)
{
var id = filesWrapper.Id; // here's the Id posted by client
long size = filesWrapper.Files.Sum(f => f.Length);
var filePath = Path.GetTempFileName();
foreach (var formFile in filesWrapper.Files)
{
if (formFile.Length > 0)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
}
// ...
}
As a side note, if I remember correctly, the
$form.serializeArray()
doesn't work well formultipart/form-data
. So I use a plainFormData
to generate the payload :
$(document).ready(function () {
$('#typea>button').click(function () {
event.preventDefault();
var form = document.querySelector("#typea");
var formData = new FormData(form);
formData.append("ID","typea");
var xhr = new XMLHttpRequest();
xhr.open("POST","Main/File");
xhr.send(formData);
});
});
A screenshot :
answered Nov 19 at 6:40
itminus
2,3961217
2,3961217
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the codevar form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
|
show 3 more comments
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the codevar form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
@it,inus Hi, The above solution worked spledidly, thank you. However it worked only for one submission. Therefore I have removed it outside document.ready() and attached it to a submit handler. Now I am getting an error saying "Content" attribute of windows object is depreciated. This is what i have done:
– Abhilash Gopalakrishna
Nov 19 at 10:34
1
1
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
@AbhilashGopalakrishna, don't submit the form, simply add a button and use it to trigger ajax : document.querySelector("#your_button").onclick= function(){ /* ... */ }
– itminus
Nov 19 at 10:54
1
1
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
@AbhilashGopalakrishna If you still cannot figure it out , please feel free to comment; or when I can access my desktop tomorrow , I'll show you a complete code.
– itminus
Nov 19 at 10:58
1
1
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the code
var form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
@AbhilashGopalakrishna, if you submit the form , the server will response with a new page. So It's better to use ajax to post the payload to server, namely use the code
var form = document.querySelector("#typea"); var formData = new FormData(form); formData.append("ID","typea"); var xhr = new XMLHttpRequest(); xhr.open("POST","Main/File"); xhr.send(formData);
– itminus
Nov 19 at 11:44
1
1
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
Let us continue this discussion in chat.
– itminus
Nov 19 at 11:44
|
show 3 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53364683%2fhow-can-i-extend-and-add-to-the-iformfile-interface-in-net-core-need-to-append%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown