How to Implement get and post methods in asp.net web forms using asp.net C#
Please Help Me !..................
How to Implement get and post methods in asp.net web forms using asp.net C#
Please Help Me !..................
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyaprakash SamantarayPosted Dec 27, 2023, 9:55 AM
for web api get method using asp.net web form >> https://shorturl.at/ijnv8
Anandu G NathPosted Dec 27, 2023, 9:07 AM
Refer Below
https://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/jquery-ajax-get-and-post-calls-to-controllers-method-in-mvc/
Sachin SinghPosted Mar 20, 2023, 8:04 AM
In web forms we create web methods that serves like API service and could be consume using ajax calls.
TarunPosted Mar 20, 2023, 7:52 AM
dear @Tuhin paul brother
i was told that i should not take the controller i have to take normal class and it should work as a controller this is my requirement pls help me find out when i hit postman it checks the class
Tuhin PaulPosted Mar 20, 2023, 12:23 AM
1. Create a new ASP.NET Web Application project in Visual Studio.
2. Add a new Web API Controller class to the project.
3. In the Controller class, create methods for the GET and POST operations.
4. Build and run the project.
5. Test the GET and POST methods using Postman or any other REST client. To test the GET method, send a GET request to the URL of the controller action (e.g., http://localhost/api/Controller/GetData). To test the POST method, send a POST request to the URL of the controller action with the new data as the request body (e.g., http://localhost/api/Controller/AddData).
6. Verify that the response from the server is as expected.
Jignesh KumarPosted Mar 17, 2023, 7:27 AM
Hello Tarun,
Please refer this one,
https://www.c-sharpcorner.com/article/calling-web-api-using-httpclient/
https://www.aspsnippets.com/Articles/Call-Consume-Web-API-in-Code-Behind-in-ASPNet-using-C.aspx#:~:text=In%20order%20to%20add%20a,suitable%20name%20and%20click%20OK.
Tuhin PaulPosted Mar 17, 2023, 7:13 AM
The Page_Load event handler is called when the Web Form is first loaded on a GET request. The IsPostBack property is used to determine whether the request is a POSTback (i.e., the result of a form submission) or an initial GET request.
The btnSubmit_Click event handler is called when the user clicks the Submit button on the form. This method is used to process the user input and perform any necessary actions on the server.
Tuhin PaulPosted Mar 17, 2023, 7:13 AM
1. Create a new Web Forms application in Visual Studio.
2. Add a new Web Form to the project.
3. Add server controls to the Web Form to accept user input.
4. In the code-behind file of the Web Form, add event handlers for the GET and POST methods.
5. In the GET event handler, retrieve data from the server and populate the server controls with the data.
6. In the POST event handler, process user input and perform any necessary actions on the server.
TarunPosted Mar 17, 2023, 4:51 AM
How To Implement the Restful Web Services Get and Post Methods In asp.net and its hit the postman
Please Help Fast.....!