.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Multiple same ID on different pages - one CSS file

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net


I`s my first post so hello to everybody.

I am fresh to web programming and I have a questions.

In my project I have few pages. On two of them I have <div> s, inside of which I have textboxes. The Id`s of the <DIV>s are the same, and I don`t want to change them because they are giving me information about what Div is it.

Ofcourse, as they are in different web pages, thy need to have a different style.

How to deal with it in the CSS file? Is that possible e.g. to create a class e.g. "Page1", and assign a style to Id`d inside that class??



View Complete Post

More Related Resource Links

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

how can i use stylesheet file on pages that derives from masterpage


Hello. i use masterpage on my project. i want to add stylesheet file on pages that derives from masterpage. I add default.aspx page like this:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="styles/salon.css" rel="s." type="text/css" />

But i can't see design page like this. It gives error like this:
Error 1 Cannot switch views: Validation (Internet Explorer 6): Element 'link' cannot be nested within element 'div'. 

i use IE7. Also how can i use jquery pages that derives from masterpage. Thanks...


Inherit from multiple master pages


How does one inherit from multiple master pages?


I.e.  I have a base master page that contains several ContentPlaceHolders.









I want to have separate master page files (one for each ContentPlaceHolder) so that I have 4 separate files: 3 ContentPlaceHolders (each adding specific content) and 1 base master page.

The ASPX files will then inherit from the base master page.



Using the single *.rpt file with multiple data sources


I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:

protected void BTN_RunReport_Click(object sender, ImageClickEventArgs e)
CrystalReportViewer_ClientLetter.Visible = true;

ConnectionInfo con = new ConnectionInfo();
con.ServerName = Constants.ServerIP;
con.DatabaseName = Constants.DatabaseName;
con.UserID = Constants.UserID;
con.Password = Constants.Password;

CrystalReportViewer_ClientLetter.ReportSource = Server.MapPath(Constants.ClientLetters);
ParameterFields parameter = CrystalReportViewer_ClientLetter.ParameterFieldInfo;
ParameterField batchdate = new ParameterField();
batchdate.Name = "@BatchDate";
ParameterDiscreteValue batchdate_value = new ParameterDiscreteValue();
batchdate_value.Value = Convert.ToDateTime(txtBatchDate.Text);

foreach (TableLogOnInfo tlf in CrystalReportViewer_ClientLetter.LogOnInfo)
tlf.ConnectionInfo = con;

Error using multiple webconfigure file in ASP.Net 3.5

when i using mutiple webconfigure file in .net 3.5 ,error Comes t is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

SSIS multiple data flows accessing the same raw file

I have multiple data flow tasks accessing the same raw file at virtually the same time.  I would like to know if the data flow tasks lock the raw file during read?  Can multiple data flow tasks read the same raw file at the same time.  I'm currently developing with a very small data set, but I would like to know if I should be concerned with the possibility of the data flow tasks competing for access to the same raw file. Thanks.

ssis 2008 Loading MULTIPLE EXCEL file

HI it is possible for me to load multiple text file using for each loop,but if i try the same process for EXCEL file then my excel source throws an error. Also when i created my variable in value  i have given the path of my excel file ,still it didnt help me..because the moment i map the variable with the connection string of source excel connnection(property->expression->connection string) it start giving error if you could help me or provide some reference it will be of great help http://bi-polar23.blogspot.com/2007/08/loading-multiple-excel-files-with-ssis.html i tried this link but got stuck with it on step 12 and 14 (below  is my connection string) and variable is @Filename which i have created Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\mushtaq.sheikh\Desktop\ForEach\New Microsoft Excel Worksheet1.xlsx;Extended Properties="Excel 12.0;HDR=YES"; The moment i try to edit my connection string by comparing connection string provided in link it gives error(an OLEBD error has occured with error code 0x80040E73) on excel source Thanks in advance

Multiple File Uploads and blocked file types.

Hi hopefully someone can help me with this. I have removed a few file type extensions from the blocked file type administration interface (.ascx, ashx, dll) etc. If I browse to my shared folder I am able to load files of these types into my shared folder on a file by file basis, if however I try and use the drag and drop activex control facility for multiple files provided for IE8, files of these types are still blocked. If I also map a network drive from my PC to the shared folder and attempt to copy files of the above types, they're also being blocked. Perhaps someone has come across a similar issue and can shed some light on what they did to overcome this problem. Kind regards Paul

how to hide .aspx extension for multiple pages


In MVC it's very easy to control routing.


In my classic ASP.NET application I want to "hide" .aspx extension


I can do it with new ASP.NET 4 feature: MapPageRoute

  1. routes.MapPageRoute("login""login""~/login.aspx");  
routes.MapPageRoute("login", "login", "~/login.aspx");


Now http://site.com/login will work. But I have more than 50 pages, and adding 50 rules is ridiculous.


How can I solve this?


creation of multiple .aspx pages from database name


 hi ,
i am making an internal social networking application for my small organisation where i work  .i have a list of all employee  names in a mssql 2000 database that are the names of 5000 employees of the company  one by one arranged in rows in a single coloumn of a table . i have a folder ,i want to make  .aspx files/pages in that folder ,the file name should be same as names of the person in database coloumn.can any help me with codes to automatically make the .aspx pages with the same names as it is in database coloumn.(note that folder will not take any duplicate values(name will not be repeated)) .i am making application using asp.net 2.0.file will be automatically created in the folder as soon as new name is entered in database.its very difficult to make 5000 aspx page with each employee name and it will be difficult to make new pages again and again after new employees names are entered.so i want that files will be automatically created after employee names are registered.  

thanks in advance.

hoping for help for someone.

How to merge sheets from multiple excel files into one .xls file?


 I have several excel spreadsheet fils, each of them contains multiple work sheets that may storing images or data.

 How could I merge all of these work sheets to just one .xls file and keep their original layout and style using asp.net?

 Thanks in advance.

Multiple databases backup/restore in a transaction, if possible, into only one file


Hi dear,

I have three databases named XDW, XOLTP, XOLTPSchema. All of these are for only one application. In the application, user should do backup/restore using GUI.


1. How I should do backup/restore in one transaction? i.e. all of three actions should be success elsewhere all of them should fail.

2. Is it possible to backup them into only one file e.g. X.bak?

3. Or, What is the standard solution in this condition?

Thanks in advance.

How To: Joining multiple DataTable using “LINQ to DataSet”




<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
WIDTH="550" HEIGHT="400" id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"


Single Row (Flat File) to Multiple DataSets


I have a flat file with 320k rows.  Each row contains generic data such as a supplier number, plant name, and dock code.  Each row also contains 5 sets of 4 fields route name, region code, arrival date and departure date.  Each of the 4 fields begin SX_ where the X is the set number.  So for example the column names per row are:


What I need to do, using the flat file as a source, is to read the generic fields into one dataset and the SX fields into another.  I then need to copy these datasets to an OLE DB destination into their respective tables.  This is very easy using a Windows Service and VB.NET.  Anyone have any ideas how to accomplish this using SSIS 2008?

Webpart on multiple pages


I'm trying to have a webpart displayed on multiple pages. However, this webpart gets different data based on what is in the URL, so the situation explained in this link http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/5d0672ad-9b39-40b8-a60c-bfcb9e6895b7/ will not work. Is there any way to say, create a template or something and drop my webpart in it, and have the webpart "know" what is in the query string, and display its data accordingly? I tried altering the WebPartPage.aspx file in SP Designer with no luck; I couldn't figure out how to get the aforementioned webpart in there.


Thanks for any help or ideas to try. Appreciate your time.

LINQ to SQL Classes (dbml file) across multiple websites issue



I have a single LINQ to SQL Classes (dbml file) compiled in a Class Library that's referenced by 3 websites. Inside that Class Library there's also a class that's using the DBML to manipulate data.

At one point it needs to save in a user table the user info (firstname, lastname, email). SOMEHOW (!?) two of the 3 webapps saves email instead of firstname and viceversa while the other 1 saves them correctly ! The one compiled last seems to be the one saving correctly.

There's no code error as I have debugged this multiple times. The values are assigned correctly but before the SubmitChanges() call the data inside the database object is corrupted.

Now, I have already fixed this locally by putting every website in a separate AppPool (which also needs to be set to "Classic" and not "Integrated". However I really don't want to bug the client with such IIS changes so I'm looking for another workaround !

Please Help!



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend