In a pluggable architecture for asp.net mvc, i need to build a form where any plug-in can add its form elements to a form through application wide events. When the form is submitted back to server, values of elements must be saved by relevant plug-in which added the form elements. how to build and save forms like that?
I am trying to build a repeater dynamically through the code behind. I found this code on the microsoft site:
Protected Sub Page_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Repeater1.HeaderTemplate = New MyTemplate(ListItemType.Header) Repeater1.ItemTemplate = New MyTemplate(ListItemType.Item) Repeater1.AlternatingItemTemplate = _ New MyTemplate(ListItemType.AlternatingItem) Repeater1.FooterTemplate = New MyTemplate(ListItemType.Footer) Repeater1.DataSource = New String() {"one", "two", "three", "four"}
[Code]....
So this code works without throwing any exceptions, but what I would like to do is accessing the DataSource inside of Sub InstantiateIn(). I know you can access the DataSource in the front end using DataBinder.Eval and Container.DataItem, but is there a way to access the data during the InstantiateIn() Sub?
Or if there is another way to do this i'm up for trying that as well. Essentially I am trying to avoid writing asp.net code, instead I would rather write everything in vb (code-behind)
I have a .NET 1 web app that is using a Oracle database, the web app has a page of table names that allows the users to select, there are 101 tables listed on the page. When the user clicks on a table name, it takes them to a page that shows user friendly column headers, the table data, etc. Is there a way to use one GridView to do this and show the user friendly column headers instead of creating 101 pages or 101 user controls and show that control based on the table passed into the page?
for example: the user clicks table 22, I want my gridview to look like this
Buyer's Name State City Zip Code Phone Number
if they click table 55 I want them to see this
Product Wholesale Price MSRP Sale Price On Sale (check box)
and so I, I would like to use 1 gridview on one page if possible and build the grid on the "fly", We have the user friendly column headers in a table.
So my questions are:
is this possible, if so, what is the best approach in doing this
from a scalabilty level and maintenance level, would the 1 gridview be worth for all 101 (and growing tables), or would building a seperate user control for each table be better?
this web application must scan any webpage and save result if some data has been changed.
it should to search for key words and seek if their values has been modifyed/changed.
i will create this application with asp.net mvc.
what should i use to scan some webpage? if i will insert in my page any url of page which i will to scan, what should happens? are they some robots which looking for it if some content changes?
i need create query dynamically in my .cs page. Actually what happens in my application is user can pass the column name and Table names from the page. by using those parameters(columns and tables) we need build Select query . we need retrieve those values from database and show in text format to user.there may multiple table and single table have multiple columns also.
I am developing a website that has product images on an external server. I have code that tests to see if the image exists like (pseudo code):
DynamicString = FunctionThatCreatesDynamicString() ' DynamicString = "[URL] If ImageExists(DyanmicString) = StatusCode.200 Then ' Embed link in ASP.NET page Else ' Embed not found image in ASP.NET page End If
My code builds fine and appears to execute. The problem occurs when I attempt to view the external link in a browser, the image appears properly (I have to authenticate first, but that's OK considering I'm on an internal network and this app will be used internally). However, when I attempt the view the source in my generated HTML page, I am seeing the image to the "Not Found" image when I know the image is there. I compared all the characters in my dynamically assembled to the external link and all the characters are matching up correctly. I'm wondering if the authentication has anything to do with why the image is not rendering properly on my rendered HTML.
I recently stumbled upon this thread over at StackOverflow regarding the dynamic construction of a Master Page menu based on what roles a user is a part of. The original poster proposed a solution to his own problem, but rightfully noted that it was kludgey in that it didn't scale, but also that it violated the Separation of Concerns (SoC) model of MVC.
I have SQLDataSource for my gridview. By default it works fine but i need to determine a few things before calling my procedure. By this i mean i need to determine a few things about the fields completed and set a flag to determine where the procedure will look.
I found a few examples online on passing parameters in code behind, but cant seem to get them to work. Here is what i tried and cant get results back. When i execute the procedure on the SQL side with the same parameter values, it works, so i know its returning results, so means my values are not being sent or im doing something really wrong. I have some of the lines commented out so the page can load and display for now.. but i need to get it working with custom parameters and flags.
I having a dynamic build html table from jQuery and trying to attach the click event to it..How can I register that event on table and what to do with the function that looking for the table tr id and can't find it.I prefer not to write the click function as text as well with the tbl if possible, and not to write some of the table on the html body if possible - so all the table will be build from the innerHTML
I want to build a survey system where you can build a form with questions and some answers to these questions and then members who will log in will be able to take the test.
Then i want to present the different results from the test in some diagram or something like that.
i have a requirement where user can edit the image in the flash tool runtime and i am saving the image to the server ...but now i have to give the option to save the same image to the localhost.one more thing is i am passing the parameters frm the flash tool to another page and doing all the operations on that page like save and download.
here click on the add your logo link then in the logo tab you can upload any logo from localhost then on the save tab i have to save the image to the server and then download it but both should be done at the same time i have done the save code but unable to downlaod it.
I was wondering how about may I save the selection of the checked items of a dynamically created CheckBoxList?On postback the entire checkboxlist is lost. As the CheckboxList items are manually added in and not databinded, the selection is also lost.I was thinking of javascript, but i'm not sure how to implement it.
I created a web site with admin control with C# ASP.Net. Admin can create a new button1 with button2.I did this. but when admin login again the created button is not seen.I guess I should save this created button at SQL Server but how should I do.
I have a dinamically gridview, populated according with the SQL sintaxe from the user, with a TextBox. I enable in the gridview an Edit button, and the rowEdit works well when fired. But my problem is Update button. How to save the record edited, in a dinamically gridview, when I can't programatically set the fields to be saved? Ie, I need to iterating with all fields in the gridview edited record and update. How to do this?
I have a dialogue window that contains an Accordion Control that is dynamically built. The only thing that appears on my source page is the opening and closing tags for the control. The panes and the controls that appear on the panes are all added dynamically based on records in a database.
Now here is my situation, if a certian action is performed on one of the controls then I want to save that controls data and make it no longer available for use, this was easily accomplished by having the control hide itself. An issue arises though when I have hidden all of the controls on a certain pane, the header for the pane still exists and this is not the desired result.
What I would like is to be able to dynamically remove the entire contents of the control and then re-build it. Due to the timing of the events in the page post back sequence, a simple call to the method that builds the control will not work and if an explanation is required I will provide one. Also, looping through all of the panes and the controls on each pane will not work since after the first pass through the loop the panes collection is mutated, the enum table for the control is no longer correct since the initial pane has been removed, as a result the for loop throws an error.
Can any one come up with a way that I can clear out the control, keeping only the basic empty structure, and re-build it all in a single post to the server?
I have a question regarding a situation that occurs with GridView, ObjectDataSource in ASP .NET application. The GridView is linked to the ObjectDataSource and both are included within an UpdatePanel letting the GridView to fill in an asynchronous way from a form in the same page so it gets more rows as the user enters the data:
I start the project with Visual Studio 2008, fill the form and it works correctly. Then I stop the execution: rerun again and the data I entered in the previous run is in the GridView. Is like some sort of cache saved the data from the session before. I checked that EnableCaching property is set to false for the ObjectDataSource. If I Rebuild Web Site in Visual Studio (not just Build) then it works corretly leaving the GridView empty. Is this caused just becuase of Visual Studio? Can it be turned off? And will it happen in the final IIS it will run on?
I was wondering does anyone know how to save a file to the sever without using a fileupload? What I have is a file that is dynamically created as a .CSV file. Here's that part of the code:
[Code]....
How can I save that to the server instead of poping up a Save/Open dialog box?
I'm building an ASP.NET UserControl where users of the website can upload several pictures at once. I'm doing it the old fashioned way by letting the user enter the amount of FileUpload controls wanted and then add them dynamically from C# to a asp:Panel control.
While this works, the values/files from the FileUpload isn't stored for when the user clicks the "Save" button. How exactly do I go about this problem?
My code for specifying the amount of FileUpload controls wanted: