Hi peeps, I am new to spark and have a project in front of me which I am pretty confused about. I have got my head around a few things but still pretty confused to how all this is working. The problem I am have is that I already have a button, which when I click on and it exports data from database to a csv file. Now I need to create a similar button but this button will take data from a table that I have on the .spark form. My initial thought was to copy the button and then change the code of how the new button will behave. Below is the code for the button that is already created. <form action="ExportUsersDetails" method="post" class="jqtransform"> <p> <label for="ExportUsersDetails"> Export Users Details </label> <input type="submit" name="ExportUsersDetails" value="Export CSV..." class="button" /> </p> </form> <hr class="hr-780" /> <form action="ExportStockLists" method="post" class="jqtransform"> <p> <label for="ExportStockLists"> Export Stock Lists </label> From <input type="text" name="StartTime" value="" class="datepicker inputbox-sml" /> To <input type="text" name="EndTime" value="" class="datepicker inputbox-sml" /> <input type="submit" name="ExportStockLists" value="Export CSV..." class="button" /> </p> </form> The line code highlighted in bold is what I have copied and pasted into another .spark form. What I want to know is, where is the onClick code for this button???? when I search for "ExportStockList" in my whole solution, I find nothing. Can anyone please advice me further. Thanks everyone
Maybe you've already found your answer but if not perhaps this will help: understanding ASP.NET MVC when you have prior ASP.NET web forms knowledge requires you to forget most of what you already know about web forms. Pretty much all of the ASP.NET web controls in the Visual Studio toolbox are unusable in MVC - one main thing that's evident in your code snip above is the distinct lack of markup like <asp:button/>, <asp:textbox/> etc. What actually is going on here is the form is posting back to an MVC controller in application code called ExportUsersDetails (identified by the form action) and the two parameters passed to the controller method are identified by the name attributes on the input elements. That's all I've got here - if you want more then I can't over recommend MVC In Action by the Headspring team enough.
hey man, thanks for ur help. the problem now i am having is that the controllers are all in a dll file, which also includes all the models. i have tried decompiling everything but i end up with about a million errors lol!. what is the best way around this? can refrerence the table that i have created in the .spark page to a aspx page? that way i can write some code-behind in the aspx page and then export that data to a csv? thanks man