{"id":226057,"date":"2024-04-06T07:43:28","date_gmt":"2024-04-06T07:43:28","guid":{"rendered":"https:\/\/namso-gen.co\/blog\/?p=226057"},"modified":"2024-04-06T07:43:28","modified_gmt":"2024-04-06T07:43:28","slug":"how-to-clear-textbox-value-after-submit-in-asp-net-mvc","status":"publish","type":"post","link":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/","title":{"rendered":"How to clear textbox value after submit in ASP.NET MVC?"},"content":{"rendered":"<p>ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the textbox values after form submission, ensuring a clean user interface for the next interaction. In this article, we will discuss how to achieve this and provide answers to some related frequently asked questions.<\/p>\n<p>**How to clear textbox value after submit in ASP.NET MVC?**<br \/>\nTo clear the textbox value after submitting a form in ASP.NET MVC, you can take advantage of the ModelState object. After processing the form submission, you can simply call the ModelState.Clear() method to reset the textbox values. This ensures that the textboxes are empty when the page is rendered again.<\/p>\n<p>&#8220;`csharp<br \/>\n[HttpPost]<br \/>\npublic ActionResult SubmitForm(MyModel model)<br \/>\n{<br \/>\n    \/\/ Process the form submission<\/p>\n<p>    ModelState.Clear();<\/p>\n<p>    return RedirectToAction(&#8220;Index&#8221;);<br \/>\n}<br \/>\n&#8220;`<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_62 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#1_Can_I_clear_specific_textboxes_instead_of_clearing_all_form_fields\" title=\"1. Can I clear specific textboxes instead of clearing all form fields?\">1. Can I clear specific textboxes instead of clearing all form fields?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#2_Is_it_necessary_to_clear_textbox_values_manually\" title=\"2. Is it necessary to clear textbox values manually?\">2. Is it necessary to clear textbox values manually?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#3_How_can_I_prevent_form_resubmission_on_page_refresh\" title=\"3. How can I prevent form resubmission on page refresh?\">3. How can I prevent form resubmission on page refresh?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#4_Can_I_use_JavaScript_to_clear_textbox_values_after_submit\" title=\"4. Can I use JavaScript to clear textbox values after submit?\">4. Can I use JavaScript to clear textbox values after submit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#5_Does_clearing_textbox_values_affect_their_model_binding\" title=\"5. Does clearing textbox values affect their model binding?\">5. Does clearing textbox values affect their model binding?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#6_Is_there_an_alternative_to_using_ModelStateClear_for_clearing_textbox_values\" title=\"6. Is there an alternative to using ModelState.Clear() for clearing textbox values?\">6. Is there an alternative to using ModelState.Clear() for clearing textbox values?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#7_Can_I_clear_textbox_values_without_redirecting_the_user\" title=\"7. Can I clear textbox values without redirecting the user?\">7. Can I clear textbox values without redirecting the user?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#8_What_happens_to_the_textbox_values_if_there_is_a_validation_error\" title=\"8. What happens to the textbox values if there is a validation error?\">8. What happens to the textbox values if there is a validation error?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#9_How_can_I_maintain_textbox_values_across_multiple_form_submissions\" title=\"9. How can I maintain textbox values across multiple form submissions?\">9. How can I maintain textbox values across multiple form submissions?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#10_Can_I_clear_textbox_values_using_jQuery\" title=\"10. Can I clear textbox values using jQuery?\">10. Can I clear textbox values using jQuery?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#11_Is_there_a_way_to_reset_the_textboxes_to_their_initial_values_after_submit\" title=\"11. Is there a way to reset the textboxes to their initial values after submit?\">11. Is there a way to reset the textboxes to their initial values after submit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#12_Does_clearing_textbox_values_affect_the_performance_of_my_application\" title=\"12. Does clearing textbox values affect the performance of my application?\">12. Does clearing textbox values affect the performance of my application?<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_Can_I_clear_specific_textboxes_instead_of_clearing_all_form_fields\"><\/span>1. Can I clear specific textboxes instead of clearing all form fields?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can clear specific textboxes by using the ModelState.Remove(&#8220;PropertyName&#8221;) method. Replace &#8220;PropertyName&#8221; with the name of the property you want to clear.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Is_it_necessary_to_clear_textbox_values_manually\"><\/span>2. Is it necessary to clear textbox values manually?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nNo, it is not necessary to manually clear textbox values after form submission. The framework automatically populates the textboxes with the values from ModelState if a model validation error occurs.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_How_can_I_prevent_form_resubmission_on_page_refresh\"><\/span>3. How can I prevent form resubmission on page refresh?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nTo prevent form resubmission on page refresh, you can follow the &#8220;Post\/Redirect\/Get&#8221; (PRG) pattern. After processing the form submission, redirect the user to a different page using the RedirectToAction method.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Can_I_use_JavaScript_to_clear_textbox_values_after_submit\"><\/span>4. Can I use JavaScript to clear textbox values after submit?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can use JavaScript to clear textbox values after submitting a form. Simply attach an event listener to the form submission event, and inside the event handler, set the textbox value to an empty string.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_Does_clearing_textbox_values_affect_their_model_binding\"><\/span>5. Does clearing textbox values affect their model binding?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nNo, clearing textbox values does not affect model binding. When the form is submitted, the framework binds the values from the request to the corresponding properties of the model, regardless of whether the textboxes are empty or not.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"6_Is_there_an_alternative_to_using_ModelStateClear_for_clearing_textbox_values\"><\/span>6. Is there an alternative to using ModelState.Clear() for clearing textbox values?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, an alternative approach is to use the TempData dictionary to store the textbox values before performing the form submission logic. Afterward, redirect the user to the desired page and retrieve the values from TempData to repopulate the textboxes.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"7_Can_I_clear_textbox_values_without_redirecting_the_user\"><\/span>7. Can I clear textbox values without redirecting the user?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can clear textbox values without redirecting the user by using client-side scripting. Utilize JavaScript to clear the textbox values upon form submission without performing a full page reload.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"8_What_happens_to_the_textbox_values_if_there_is_a_validation_error\"><\/span>8. What happens to the textbox values if there is a validation error?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nIf a validation error occurs, the framework will automatically re-render the page and populate the textboxes with the submitted values from ModelState. The textboxes will not be cleared in this scenario.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"9_How_can_I_maintain_textbox_values_across_multiple_form_submissions\"><\/span>9. How can I maintain textbox values across multiple form submissions?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nTo maintain textbox values across multiple form submissions, you can store the values in a persistent storage medium such as a database or session. Retrieve the values when rendering the form and set the textbox values accordingly.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"10_Can_I_clear_textbox_values_using_jQuery\"><\/span>10. Can I clear textbox values using jQuery?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can use jQuery to clear textbox values after form submission. Select the desired textboxes using their CSS selectors and set their values to an empty string in the jQuery event handler.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"11_Is_there_a_way_to_reset_the_textboxes_to_their_initial_values_after_submit\"><\/span>11. Is there a way to reset the textboxes to their initial values after submit?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nYes, you can store the initial values of the textboxes in hidden fields or a server-side storage medium. After form submission, retrieve the initial values and set the textbox values accordingly.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"12_Does_clearing_textbox_values_affect_the_performance_of_my_application\"><\/span>12. Does clearing textbox values affect the performance of my application?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\nClearing textbox values using ModelState.Clear() does not significantly impact the performance of your application. However, be cautious when clearing a large number of form fields, as this may result in a slight delay in rendering the page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the textbox values after form submission, ensuring a clean user interface for the next interaction. In this article, we will discuss how to achieve this and provide answers to some related frequently asked &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to clear textbox value after submit in ASP.NET MVC?\" class=\"read-more button\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#more-226057\">Read more<span class=\"screen-reader-text\">How to clear textbox value after submit in ASP.NET MVC?<\/span><\/a><\/p>\n","protected":false},"author":57,"featured_media":107420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86279],"tags":[],"class_list":["post-226057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to clear textbox value after submit in ASP.NET MVC?<\/title>\n<meta name=\"description\" content=\"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to clear textbox value after submit in ASP.NET MVC?\" \/>\n<meta property=\"og:description\" content=\"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\" \/>\n<meta property=\"og:site_name\" content=\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/synchronyfinancial\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-06T07:43:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Casey Mayer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@synchrony\" \/>\n<meta name=\"twitter:site\" content=\"@synchrony\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Casey Mayer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\"},\"author\":{\"name\":\"Casey Mayer\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/89e431077ef417dfaa131f435124f18f\"},\"headline\":\"How to clear textbox value after submit in ASP.NET MVC?\",\"datePublished\":\"2024-04-06T07:43:28+00:00\",\"dateModified\":\"2024-04-06T07:43:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\"},\"wordCount\":667,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"articleSection\":[\"Learn\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\",\"name\":\"How to clear textbox value after submit in ASP.NET MVC?\",\"isPartOf\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\"},\"datePublished\":\"2024-04-06T07:43:28+00:00\",\"dateModified\":\"2024-04-06T07:43:28+00:00\",\"description\":\"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the\",\"breadcrumb\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/namso-gen.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to clear textbox value after submit in ASP.NET MVC?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#website\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"description\":\"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co\",\"publisher\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/namso-gen.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#organization\",\"name\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\",\"url\":\"https:\/\/namso-gen.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"contentUrl\":\"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png\",\"width\":500,\"height\":164,\"caption\":\"Namso Gen Blog - Free Credit Card Generator [100% Valid]\"},\"image\":{\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/synchronyfinancial\",\"https:\/\/twitter.com\/synchrony\",\"https:\/\/www.youtube.com\/synchronyfinancial\",\"https:\/\/www.instagram.com\/synchrony\",\"https:\/\/www.linkedin.com\/company\/synchrony-financial\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/89e431077ef417dfaa131f435124f18f\",\"name\":\"Casey Mayer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Casey Mayer\"},\"description\":\"Guest author Casey Mayer has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to clear textbox value after submit in ASP.NET MVC?","description":"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/","og_locale":"en_US","og_type":"article","og_title":"How to clear textbox value after submit in ASP.NET MVC?","og_description":"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the","og_url":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/","og_site_name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","article_publisher":"https:\/\/www.facebook.com\/synchronyfinancial","article_published_time":"2024-04-06T07:43:28+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2024\/03\/faq.png","type":"image\/png"}],"author":"Casey Mayer","twitter_card":"summary_large_image","twitter_creator":"@synchrony","twitter_site":"@synchrony","twitter_misc":{"Written by":"Casey Mayer","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#article","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/"},"author":{"name":"Casey Mayer","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/89e431077ef417dfaa131f435124f18f"},"headline":"How to clear textbox value after submit in ASP.NET MVC?","datePublished":"2024-04-06T07:43:28+00:00","dateModified":"2024-04-06T07:43:28+00:00","mainEntityOfPage":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/"},"wordCount":667,"commentCount":0,"publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"articleSection":["Learn"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/","url":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/","name":"How to clear textbox value after submit in ASP.NET MVC?","isPartOf":{"@id":"https:\/\/namso-gen.co\/blog\/#website"},"datePublished":"2024-04-06T07:43:28+00:00","dateModified":"2024-04-06T07:43:28+00:00","description":"ASP.NET MVC is a powerful framework that allows developers to build dynamic and interactive web applications. One common requirement is to clear the","breadcrumb":{"@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/namso-gen.co\/blog\/how-to-clear-textbox-value-after-submit-in-asp-net-mvc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/namso-gen.co\/blog\/"},{"@type":"ListItem","position":2,"name":"How to clear textbox value after submit in ASP.NET MVC?"}]},{"@type":"WebSite","@id":"https:\/\/namso-gen.co\/blog\/#website","url":"https:\/\/namso-gen.co\/blog\/","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","description":"In Namso gen blog you can get many tips regarding to Credit cards, VCC, Credit card security etc. You can generate credit cards by using Namso-gen.co","publisher":{"@id":"https:\/\/namso-gen.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/namso-gen.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/namso-gen.co\/blog\/#organization","name":"Namso Gen Blog - Free Credit Card Generator [100% Valid]","url":"https:\/\/namso-gen.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","contentUrl":"https:\/\/namso-gen.co\/blog\/wp-content\/uploads\/2020\/07\/namso-gen-logo.png","width":500,"height":164,"caption":"Namso Gen Blog - Free Credit Card Generator [100% Valid]"},"image":{"@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/synchronyfinancial","https:\/\/twitter.com\/synchrony","https:\/\/www.youtube.com\/synchronyfinancial","https:\/\/www.instagram.com\/synchrony","https:\/\/www.linkedin.com\/company\/synchrony-financial"]},{"@type":"Person","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/89e431077ef417dfaa131f435124f18f","name":"Casey Mayer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/namso-gen.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Casey Mayer"},"description":"Guest author Casey Mayer has meticulously crafted and revised this article to the best of their knowledge and understanding. Readers are strongly advised to exercise caution, verify information independently, and rely on their own judgment when considering the information provided. Read more articles on Namso Gen here."}]}},"_links":{"self":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/226057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/users\/57"}],"replies":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/comments?post=226057"}],"version-history":[{"count":0,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/posts\/226057\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media\/107420"}],"wp:attachment":[{"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/media?parent=226057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/categories?post=226057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/namso-gen.co\/blog\/wp-json\/wp\/v2\/tags?post=226057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}