In response to this question on Stack Overflow, I have received less that satisfactory answers. One points to an example of how to add code behind to a view ( ), and another suggests "foreach is your friend". Just where would I use foreach, except in the controller injecting other sub-views into the view, but that is just a little too close to coupling controller and view. I can't believe the answerer meant in the actual view page, unless with JS, adding rows to a table based on view data.
How do I achieve the same effect as a dynamic row Repeater control, or even dynamic columns as well, as in a GridView, in a pure MVC model?
I am generation report using crystal reports 10... the report is working fine but the problem that it is taking too long to load and display the data.
what I am doing is: I have two tables (one to many). I am getting all records from the first table and storing it in a table in my dataset... then I am getting all records from the second table depending on the ID from the first table. then storing it in another table in the dataset.
after that, I merge both tables in dataset by doing for each loop to merge each record to its related id.
Finally, bind it to the report
The merging process takes 2 minutes!!
What can I do? is there a better way to do the same thing?
can I control the range of records in my SQL statement?
Try to write SQL JOIN Query that merges the two tables. Then, create a view using that query. This View can probably be used to populate the Dataset. SQL JOIN should be faster than merging the way you said I guess.
It's code that drives you - Shyam
Well, you need to write a program in java, or in a language that supports activeX and then you need to integrate it into your website. Finally, you need to accept that a lot of people won't run it b/c they will set their security settings to reject it.
What i want to do is on Click of a button a Input box must show that I get right
When then the user must enter a name into the text box and then I want to save that
Name to a verbal.
My code that i have so far -
Protected Sub Button1_Click (ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Action : ', 'NOTHING')" & "</script>"
This Brings up My Input box but i need to read the value the user enterd.
If you have only one control, you could also try hiding it and showing it again using JS.
OK, this is off the cuff, and will need debugging.
Add a hidden field called hf1.
string js = "var hf1 = '" + hf1.ClientID + "';";
var hf = document.getElementById(hf1); // this uses the client Id you wrote
hf.value = tb.value; // Not sure about this bit, the property may be 'text' instead of 'value', or even something else. It may also be different between IE and Firefox
Then write your textbox so it has the following attribute:
Then when the focus leaves the textbox, the textbox is passed to the method, and hopefully, the value is copied to the hidden field. Then you can access this value from the codebehind.
On a site I’m optimizing I know a lot of DataSets are stored in Viewstate. I need a tool that can help me analyze the contents of the Viwestate so I can localize big Viewstates. A similar tool for analyzing contents of Session and cache data in IIS would be great.