Multiple Javascript Files, Combine Into One?
Feb 2, 2011
I am developing in asp.net mvc and using multiple javascript files.eg jquery, jquery-ui, google-maps my own js files etc.for performance should i combine these into one?if so how?
View 4 Replies
Similar Messages:
Apr 1, 2010
Is there any way to combine multiple Audio Files (.wav etc) into one file?
I have found an example here :
[URL]
Quote:
[code]....
View 1 Replies
Jan 19, 2010
I lied! The commandline fails if the two source files have different bitrates (does samplerate matter?). Also, the source code below succeeds when the two sources are the same bitrate. So, this looks like a bitrate challenge now.
Original question:
result.mp3 (from the commandline, below) is playable in WMP11. The ASP.NET code below serves a file which plays fine in WMP11. But, when I uncomment those two lines, WMP11 won't play the file. Something about the code that merges the two MP3 files isn't to the satisfaction of WMP11. How can I change the ASP.NET code to merge the two MP3s in the HTTP response with the success that the 'copy' commandline gives me?
protected void Page_Load(object sender, EventArgs e) {
Response.Clear();
Response.ContentType = "audio/mpeg";
Response.AddHeader("Content-Disposition", "attachment; filename=test.mp3");
var bytes1 = System.IO.File.ReadAllBytes(@"C: est1.mp3");
WriteBytesToResponse(bytes1);
//var bytes2 = System.IO.File.ReadAllBytes(@"C: est2.mp3");
//WriteBytesToResponse(bytes2);
Response.End();
}
private void WriteBytesToResponse(byte[] sourceBytes) {
using (var sourceStream = new MemoryStream(sourceBytes, false)) {
sourceStream.WriteTo(Response.OutputStream);
}
}
copy /B test1.mp3+test2.mp3 result.mp3
View 3 Replies
Jan 10, 2011
I'm having a problem trying to combine the ScriptResource.axd files automatically generated by Ajax using ScriptManager's CompositeScript property....on some pages there's 15 of these files, so I'd like to reduce that number to reduce the HTTP requests. I tried following the post here - [URL] - but am getting errors when trying to do what it instructs, such as:
Microsoft JScript runtime error: 'Sys' is undefined Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load. Below is the code I am using for the ScriptManager. These errors go away if I do not use CompositeScript. Has anyone else attempted to combine these files? Am I doing something wrong in this code?
[Code]....
View 2 Replies
Mar 3, 2010
I have 4 different select statements which i sequently assign to an sqlDataSource like this:
sqlNoutatiProduse.SelectCommand = select;
and i keep the results in different DataViews like
MySession.Current.dataViewNoutatiProduse1 = (System.Data.DataView)sqlNoutatiProduse.Select(DataSourceSelectArguments.Empty);
Is it possible to combine into a single DataView the results of these queries?
View 1 Replies
Apr 17, 2010
i got a question that realy bothering me .... for the last 24 hours ...
how to combine c# and html/javaScript .....??
so ... the question :
for example i create a varible in my asp.net form .......
int variable = 2;
// some function .....
protect int makeItdouble(int variable)
{
return variable*2;
}
variable = makeItdouble(5); // some code i
and now i want to take this "variable" into my my javascript code .... this important thing is that i want thet this function will run first .... (the C# function)cus i take first my DataBase from the server and that prosses him more with some javascript code ...
View 10 Replies
Jan 24, 2011
I am currently working on an c# application that minimizes and combines javascript/css asynchronously in the background to load on to the page which completed. Once the combined minimized file(s) are created, they are saved on to disk and all subsequent requests to the page will load this file.
The reason for this is to assist with performance on the page. I have a concern though, what if the combined file is large, eg 200 kb. Would it be better to combine in to 2 files if this was the case and have 2 separate http requests? The file will be gzipped and cached.
View 3 Replies
Jun 23, 2010
I've created a service (class library) that uses a few other class libraries within its solution.
When I try to use this service dll in a website the system requires me to also deploy all of the child dlls of the service to the website.
I'd like to combine the service dll and all of its child dlls into a single dll.
I found a reference to "ILLINK" on the web as a tool that's supposed to enable this.
Is there a tool built into the .NET framework that will do this? It seems like it would be a not-uncommon requirement.
View 3 Replies
Dec 5, 2010
I'm fairly new to all this, but have slowly been teaching myself C# and ASP.net MVC over the past year or so...I really tried to search for this, but haven't been able to find anything - it may be I'm using the wrong terminology!I'm using ASP.NET MVC2 with EF4 connected to a SQL Express db. Situation: Without getting into too much specifics, I have one table called 'Plan.' Under 'Plan' are several different categories that are related to a single Plan item [say Category A, Category B, Category C and Category D]. Each 'Category X' table has a beginDate, endDate and other details specific to that category.
I'd like to be able to create a summary page that combines all items from Category A, Category B, Category C, and Category D and sorts by beginDate - but only need a few of the columns [eg - begin/end date, name, id].
View 1 Replies
Feb 5, 2010
I am writing a currency converting module for one of our applications. I have a list of products, a list of currencies we are interested in seeing prices for, and a list of currency rates. I want the user to be able to select which currencies from the list they see in the GridView. I also want to be able to amend my list of currencies and include a new currency, without having to make additional changes to this module. So my GridView display has to be "dynamic". Essentially I am planning on ending up with a GridView that has the following columns:
Part No - Description - USD Price - AUD Price - GBP Price
The USD price would be static as it's our base currency, the AUD and GBP are user selected and could have potentially any number of currencies listed. I would normally use a DataSet and DataTables for this work, but I am sure there is a "better" way to do it using System.Collections.Generics. Right now I have all of the data I need in List collections, but there does not seem to be a way to define how these collections relate to each other, or combine these collections into one so it can be bound to a GridView. Should I be looking at something other than List to achieve this or do I need to go back to my original approach of a DataSet and DataTables.
**UPDATE / SOME CODE**
I will explain a little bit more about what I have setup so far.
1) List of Products & Currencies - These come from an SQL DB via LINQ, so they can be any of the System.Collections.Generics objects, e.g. List, IEnumerable etc.
2) Currency Rates - These I am pulling from the European Bank public XML file. I download the file, strip the data I need out of it and currently store that as a List object.
I could store the currency rates in the database table as well, but then I have to have some sort of background process that goes and updates the rates each day. This way the rates only get updated when someone accesses the report function (which is only going to happen occasionally). So I would rather grab the latest rates "on demand". What I know I need to end up with is some object that has the following structure:
PartNo - Description - Base Price - Currency Price 1, Currency Price 2, Currency Price 3
Where the number of Currency Prices is undefined, as it's based on what currencies the user wants the report to display. It's the undefined part that I am struggling with, essentially how can I create a structured object, that I don't know the complete structure of until runtime?
View 1 Replies
May 14, 2010
This question is for wrapping up work on a database driven AJAX AutoComplete Control that I am using to provide keyword hints to user on search pages. Each record has 6 columns for keywords where each column is for an advertiser to add a keyword. These are used in meta keywords tags, but I also want to use them for AutoComplete. The problem is that I don't know how to write a SELECT statement in Visual Studio that treats all 6 keyword columns as if they were all one column. I am looking for something like
SELECT (keyword1 + keyword2 + keyword3) AS Keywords
FROM (Merchandise)
WHERE Keywords LIKE @term
The only other thing I can think of the gain this level of functionality would be to combine them into a new table.
View 7 Replies
Mar 9, 2011
I have a repeater like so:
[Code]....
Problem is, I also want to show the viewer the available number of spots in the room. But this requires somehow pull in either the current_occupancy / max_occupancy or in performing a calculation (e.g. max_occupancy - current_occupancy = actual_available) and then returning that with the room.
The end result I'm looking for is to return each room in a button control with text that looks like this:
"Room 1 - 2 Open" "Room 8 - 1 Open" and so on
View 2 Replies
Jan 5, 2011
Is there some way to intercept the HTML output stream in asp.net and make modifications? Eg using httpmodules or something? I know this is possible using java servlets and assume there must be an elegant way to do this with asp.net.
My purpose is to combine the many javascript files into one composite script which has been minified/packed, to make the page load faster.Eg, if my page normally outputs the following in the page head:
<script type="text/javascript" src="/scripts/blah.js"></script>
<script type="text/javascript" src="/scripts/yada.js"></script>
I want to replace that with the following:
<script type="text/javascript" src="/scripts/all.js"></script>
(also i realise i'll have to create all.js somehow).
View 2 Replies
Oct 13, 2010
I have an application that uses resource files to display items in multiple languages. My app uses quote a lot of javascript and the alerts need to display in the local language. To do this, I have created an http handler which will read the keys and values of the culture-specific resource file and write them to a JSON array which is then embedded in the page in a script tag, the messages can then be accesses using, for exmaple:
Message.Error (en-GB = "Error", fr-FR = "Erreur")
The messages http handler works great in development, however when I run the application on a test server, I get the error: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.Alerts.resources" was correctly embedded or linked into assembly "App_GlobalResources.b0n9j90e" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code that I use to acccess the resource file is:
ResourceManager manager = Resources.Alerts.ResourceManager;
ResourceSet resourceSet= Resources.Alerts.ResourceManager.GetResourceSet(Thread.CurrentThread.CurrentCulture, true, true);
Where Resources.Alerts is the type that contains my multi-lingual definitions. The build action for the Alerts.resx file is set to "Embedded Resource". Any ideas why this works locally but not on my test server, am I missing something?
View 1 Replies
Jan 10, 2011
How can I combine multiple rows into a comma-delimited list in sql server in build function?? in HCL
examples :
X
---
12
15
18
20
Output : 12, 15, 18, 20
with in build function of sql server.
View 6 Replies
Mar 30, 2011
I'm very new to ASP.net, so I'm just figuring this out.First off, I have multiple separate projects that will be hosted on the same server.Second, they must be able to share certain settings (like connection string, configuration options, etc).Third, those shared settings must be configurable for different deployments (test, prod, etc).
View 1 Replies
Oct 19, 2010
I have a form which inserts data in DB on Submit button click but the problem is when client click the button multiple times its sends multiple create requests means multiple button click events for the same time of same data, which must not be.
I tried to disable the button when client click the Submit button first time but after this it does not call server click event handler or not fire the server click event once it got disabled.
How to handle this multiple click problem..
I used the following code to disable the button
[code]....
View 3 Replies
May 10, 2010
I have created a Web Control in ASP for use in integrating with Telligent CommunityServer. The control is written in ASP with some 10 lines of C# backend for controlling visibility of the UI elements based on permissions, but I'd say 90% of the functionality is straight-up Javascript. The control works beautifully, until you drop two instances of the Control on the same page--since they reference the exact same Javascript functions, only one control works. How can I take this functionality that I have, this 1200 lines of Javascript, and make it so that each instance of the control can reference its each unique instance of Javascript?
View 2 Replies
Apr 12, 2010
I think I summed up the question in the title. Here is some further elaboration...I have a web user control that is used in multiple places, sometimes more than once on a given page.The web user control has a specific set of JavaScript functions (mostly jQuery code) that are containted within *.js files and automatically inserted into page headers.However, when I want to use the control more than once on a page, the *.js files are included 'n' number of times and, rightly so, the browser gets confused as to which control it's meant to be executing which function on.What do I need to do in order to resolve this problem? I've been staring at this all day and I'm at a loss.
View 2 Replies
Mar 26, 2016
i have made an .aspx page of c# in folder named as "USERPANEL". Also placed all my js in "js" folder and css files in "css" folder & all these pages are placed under "USERPANEL" folder same location where i have create a page. If i would placing the css on the page itself then it's working but not loading any external stylesheets. why? below is code as i am attaching the fontawesome file placed in fonts folder.
<link rel="stylesheet" type="text/css" href= "fonts/font-awesome.css" runat="server"/>.
View 1 Replies
Jun 17, 2010
I am designing a webpage that allows users to select multiple files and download those files. I was wondering if someone could point me in the right direction or examples as to how this accomplished in asp.net using VB.NET as my language. I'm thinking I need to determine which check boxes the user checked and then go out and programatically go out using VB.NET and compress and put those files in one zip file which will be sent to user for download. It would be nice also to incude a progress bar as well on the webform as it's compressing the files..
View 13 Replies
Mar 23, 2011
I want to create a zip files for multiple file
Ex: Folder One-----------> file1, file2, file3
want to zip 3 files into folder.zip
View 5 Replies
Dec 16, 2010
am able to download single files which is coming as bytes from database..how to go with multiple files....
View 4 Replies
Sep 23, 2010
I am trying to make a web application which copies the existing functionality of a windows forms application using Visual Studio 2003. This windows application takes multiple (I am talking at least 30) text files and joins them together into one text file which can then be feed into a Mainframe system in the correct format. I have written web applications before that uploads images and pdfs but the key thing is it was always only one or two files at a time, so this was easy to do with the HTML fileupload control.
What I want to do is to be able to open a directory on the local computer and either automatically, or give the user the chance to multi select (I dont think this is possible) all of the 30 or so files they wish to upload. Once its been uploaded I can do the processing to join the files and create my new one etc. All the examples I have seen on the web, you have to select the files one by one to add to a list box and then they can all be uploaded but this wont be acceptable to my users...
View 3 Replies
Nov 16, 2010
I have two webconfig files, on in the root directory and one in the other directory. I dont know how to access or specify for the particular pages or APIs those are in the folder.Root webconfig file used by another section and the 2nd one accessed by another api. I have no idea about that
View 3 Replies