We currently allow users to store HTML in the database. Would like to allow them to add scriptlets to their HTML email templates that would be executed at run time. Example:
[Code]....
What I want to have happen is to have the scriptlet execute before being rendered to the output stream.I found an article from Rick Strahl that is about 8 years old:
http://www.west-wind.com/presentations/dynamicCode/DynamicCode.htm. It looks like the code at the very bottom is exactly what I want, but when I tried it in my .Net 4 app, it didn't work. I get the error:
2 Errors:Line: 0 - Metadata file 'RemoteLoader.dll' could not be found
Line: 0 - Metadata file 'wwScripting.dll' could not be found
I presume this is from the Generated source code. Not sure how I tell the Generated source code where those 2 DLLs are.
Is there a different/better way of doing this these days?
I'm using CRv9 and want to make use of Google Charts API for generating QR code on fly (in asp .net) and display it in the Crystal Report in a PDF format.I have spent the whole day looking for solution with no luck. The way we output the report is we use .rpt file, feed it with data and use Response.OutputStream to feed to browser. No CrystalReportViewer control hence CSS solution is not an option.
Now, I got as far as added an OLE Object from file with Link, which I would be overwriting every time the new QR code is generated. I apreciate that CR requires it to be a bitmap, so I was planning to download and convert the google's generated PNG file to BMP, that's not an issue. The problem is that Image in the report does not update after I replace the file. Meaning, it displays the original image, which was added as an OLE Object.
If I open this report in CR designer, the image gets refresh/updated and I'd have to save changes to the report to see this new image next time I generate a PDF file.The question is really how to achieve a dynamic image in Crystal Reports 9? Remember, Picture object did not have a Graphic Location property until vXI, so I cannot use that.
Manipulations with DataSets is not an option either as we're not giving report a datasource, instead we just map the fields with FormulaFieldDefinitions.
sample qr code url: https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello%20world&choe=UTF-8
is there a way i can optimized this code and make this extensions on web.config settings so i can read from there and in future if i need to add or remove i should be able to do easily?
I am creating some dynamic textboxes through javascript, when postback is happening i am loosing the controls. I can't use Ajax instead of postback and i can't create dynamic controls from code behind.
And now I want to set the innethml to every span control with a while end, like while dr.read I would like to set the ID to the span dynamic, like text & I.innerhtml = "something" I = I + 1 end while but how do a refer to a ID dynamic of a control in the code?
But neither of these seem to work. The content of classes.aspx is:
<script runat="server"> ' Square class Public Class square Public sqRows As Integer 'Numbers of rows this square has Public sqCols As Integer 'Number of columns this square has Public sqArray(,) As Integer 'The square array ' Initialise square array to match size of canvas Public Sub initSqArray(ByVal canvCols, ByVal canvRows) ReDim sqArray(canvCols, canvRows) sqRows = canvRows sqCols = canvCols End Sub End Class
I have several web sequential pages which will modify a record and its child records in the database, called a "project". Such a project is currently passed between pages using its database ID in the URL parameters.
A project has some information specific to itself, and also consists of one or more Tasks, which each have information specific to itself.
Is it faster (alternatively, more maintainable or more easily understood) to hit the database each time I need to query the same project (and its tasks), or should I query the database once (either once for each page or once for all pages and save to Session) and check the saved object rather than the database?
is it possible to make a Linq query dynamic in the following pseduo code (to show what I'm trying to do)
[Code]....
where a2 and a3 and a4 are being populated from user controls and only one will apply. So query is done by state, zip or by city, but not by more than one, so the other two would be null. So the operator is really "OR" but I haven't found anything on a "or" or "whereOr" operator.
im wondering if its possible to add a asp button to the code below, the code below adds an image and text from my database to a dynamic div on my asp page:
using System.Data.Odbc; using System.IO; public partial class UserProfileWall : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e)
Scenario: I have a form with 3 input fields (text1, text2, text3). Is there a method to capture these fields in the aspx file of a second webform? I think you have to use someting like <%= %> but I'm not sure.Idon't want to use the code behind file because the number of input fields is dynamic
I've a few pages content on a database with a large content.
Should i use a database to store it or try another solution to avoid many connections to database from users? I've thought and XML document but i want to avoid problems with html tags.
About performance, is there better using an database or other solution?
How can I convert the following aspx code into code behind code?
[Code]....
I want the following code to be craeated on the fly (runtime). I will only add the root level grid to aspx and then in page load I want to add subsequent grids.I know we will use GridViewTemplate to add the grid but not sure how to structure it. The steps that I follow:
1. set the required properties of gridLevel01.
2. add BoundFields for level01.
3. Add template field for level02 grid....but not sure how to set other required properties like color and stuff....also not sure what position to add the subsequent gridviews.
Do I need to add the child grids to root?? I know the level2 grid will be added to level1 but what about level 3?
Im just wondering how you go about creating dynamic properties on entities that generated from a database generated model.For example I have a UserInformation table. In that table it has basic information on the user (well derr) like user name, address details etc etc. I want to add a readonly property that concatenates the user's Name, Address details and Phone Number into one string that I can output to a view. Any ideas on how i would go about creating this dynamic property. This is just a simple example, i am wanting to do some more complex calculating and concatenating.
Does anyone have experience of either creating stylesheets/themes on the fly from a database or else access the style properties of say a label control and changing these based on database values?
Im basically trying to give my users the ability to modify any one part of the design of the website while stroing these choices in a database - for example they may like a red heading.
Im happy with the solution I have for the database but was wondering if I should attach these values programatically to each individual element or dynamically produce a complete stylesheet as the page loads.
I have already created add/delete rows.. if i click on addRows new rows will be added and when i click DeleteRows the row will be deleted..BUT my question is when new rows are added n the entered data in new rows need to inserted into DAtabase...
I'm trying to add an DropDownList to a DetailsView by code, because i'm writing a solution that let's the user select an table and view your records and edit them, some of theese tables, have a foreign key column and the user must have to select some item in the list.
Below is my sample code:
[Code]....
the code above is working correctly, when the user click in the buttons New or Edit , the DetailsView opens correctly, showing the DropDownlist, but when the user click in the buttons update or insert , an error occurs, the viewState cannot be loaded:
Failed to load viewstate. The control tree which viewstate is being loaded must match the control tree used to save viewstate during the previous request. For example, when controls are added dynamically, the controls added during a post must match the type and position of the controls added during the initial request.
Or must it be a SQL Server database? If I'm reading the documentation right, as long as I use Entity Framework and not Linq to SQL, I can go against a Sybase data source. But I'm not certain...
I'm fairly new to MVC and have an issue converting something I created using normal ASP.NET to MVC framework.I have a database with one to many relationship between 2 tables. I need to be able to make amendments to the single parent row in the same page as that which will edit the many records. The values to be edited in the table with many rows to be edited are either true or false and will be edited using a checkbox.
To make it a little more complicated the list of checkboxes is actually dynamic and is built from another table.In the normal ASP.NET page, all the controls are placed in a details view and the dynamic list of checkboxes is added to a placeholder on Page_Load. Then I get the list of values that are true and, for each row in the list, use FindControl to find the checkbox with the appropriate ID and set it to flagged.
I've got the MVC page working so far as follows:
I can build the checkboxes I need by passing the list of ID's using the ViewData.
I can also add, and edit the fields that are in the table with the single row that needs to be edited.
What I'm stuck on is:
Populating the appropriate checkboxes with "true" as appropriate
Subsequently saving any updates to the checkboxes when the save button is clicked.