How can we insert an HTML input in SQL on an ASP.NET website Hosted on ASP.NET web host. My web host is hostbreak.com The code is working fine on localhost using Visual Studios 2019.
Actually I must input this data through HTML input field because there is some script behind it which generates the data in HTML only.
This is the Simple HTML input
<input ID="someid" runat="server" value="somevalue" />
I have used the following method also but getting error
<asp:HiddenField ID="someid" runat="server" value="somevalue" />
Please help me with this. Maybe my web host offers asp.net only not HTML. I am getting this error
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ecoio.IAuto.Submit_Click(Object sender, EventArgs e) in J:\EIO\ecoio\ecoio\ecoio\IAuto.aspx.cs:260
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9781022
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0
Thanks
Aucun commentaire:
Enregistrer un commentaire