This is a migrated thread and some comments may be shown as answers.

Razor Pages and Kendo Tag Helpers

4 Answers 553 Views
Button
This is a migrated thread and some comments may be shown as answers.
Rus
Top achievements
Rank 2
Rus asked on 01 Feb 2018, 05:52 PM

Hi,

I have a razor page where I have two separate forms. Each form will submit and call a separate OnPostAsync method.

To make this happen normally you would use the following:

<input type="submit" value="Submit" asp-page-handler="FormOne"/>

Which would call the method OnPostFormOneAsync().

How do I achieve the same using a TagHelper button, e.g.

<kendo-button name="TestButton" icon="filter" type="submit" asp-page-handler="FormTwo">Test</kendo-button>

Thanks

Russell

4 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 06 Feb 2018, 01:27 PM
Hello Russell,

Currently, the Kendo Core wrappers and the tag helpers do not provide support for the asp-page-handler attribute. However, the native button can be used to provide this functionality, by also setting the k-button class, which will apply the currently used Kendo Theme styling to the button:
<form asp-controller="Home" method="post">
<input type="text" id="joe" name="joe" value="Joe" />
 
<button name="TestButton" icon="filter" type="submit" asp-page-handler="FormTwo" class="k-button">Test</button>
</form>

I would also encourage you to log this as a new feature/enhancmenet request in the Kendo UI Feedback Portal. Based on the demand for this feature, it can be considered for implementation in a future release of Kendo.


Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bill
Top achievements
Rank 2
answered on 18 Nov 2020, 02:09 PM

Good day!

I saw this post from 2018 and wondered if this has changed?  

 

"Currently, the Kendo Core wrappers and the tag helpers do not provide support for the asp-page-handler attribute. However, the native button can be used to provide this functionality, by also setting the k-button class, which will apply the currently used Kendo Theme styling to the button:"

This question is asked partly because of the comment following it: 

" would also encourage you to log this as a new feature/enhancement request in the Kendo UI Feedback Portal. Based on the demand for this feature, it can be considered for implementation in a future release of Kendo."

Thank you,

Bill Holman

 

0
Nencho
Telerik team
answered on 23 Nov 2020, 01:49 PM

Hello, William,

Regarding the button - the case is still the same, as it shouldn't matter if you use the kendo-button or the standard one - in terms of layout you can achieve the Kendo look and feel in both cases. That said, the recommendation would be the same - use the standard button with kendo-button styles applied, if you need to get the advantage of the asp-page-handlers.

Regards,
Nencho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Bill
Top achievements
Rank 2
answered on 23 Nov 2020, 02:16 PM
Thank you Nencho.  Appreciate the response.
Tags
Button
Asked by
Rus
Top achievements
Rank 2
Answers by
Nencho
Telerik team
Bill
Top achievements
Rank 2
Share this question
or