|
To Whom you replied Gautham ..To me?
Ok let me explain...
Just think a scenario that i want to export data from a Dataset to Excel file.
Am using XMLTextWriter to write into the file stream from the dataset.
So if i want to format the columns of the excel,like making the first row data alone as bold letters,coming from XML file, how can i do it?
The code am using is
for(int j=0;j<xHeader.Length;j++)
{<br />
writer.WriteString("\"");<br />
writer.WriteStartElement("xsl:value-of");<br />
writer.WriteAttributeString("select", "'" + xHeader[j] + "'");<br />
writer.WriteEndElement();
writer.WriteString("\"");<br />
if (j != xFields.Length - 1) <br />
writer.WriteString(" ");<br />
<br />
}
Can you get my point now?
|
|
|
|
|
Hi guys,
Am trying to export some data to Excel file
I can succeed in exporting the data but i couldnt format the headers and data.For example,
<br />
<Styles><br />
<Style ss:ID="s21"><br />
<Font ss:Bold="1"/><br />
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/><br />
</Style><br />
</Styles><br />
if i want to include this formatting using XMLTextWriter, how can i do that?
Am using the following code to export the data:
<br />
<br />
for(int j=0;j<xHeader.Length;j++)
{<br />
writer.WriteString("\"");<br />
writer.WriteStartElement("xsl:value-of");<br />
writer.WriteAttributeString("select", "'" + xHeader[j] + "'");<br />
writer.WriteEndElement();
writer.WriteString("\"");<br />
if (j != xFields.Length - 1) <br />
writer.WriteString(" ");<br />
} <br />
I need to format this xHeader's value to be formatted as "Bold" while opening as Excel.
Please help me!
|
|
|
|
|
It seems that you are writing Xml file rather than Excel file
<l>Thanks and Regards
Sandeep
|
|
|
|
|
hi
i'm doing a project on travel & tourism in asp.net..am using oracle as the backend...so far i've created 3 tables :
1.customer table which contains all the usernames & passwords
2.package table which contains the different packages my website provides..this table consists of the package no,package name & its cost...am dealing with only 5 packages...
3.bookings table which contains almost all details i've provided in d webform like credit card no,status,date of journey,bookings date,package no etc...
for checking out the ticket availability say me if this wud work out:
like comparing the booking date & date of journey, checking if booking date is 1month before the date of journey, 1/2month before or not?? if 1 month means tickets r available,1/2 month means only half the seats r available..is it possible to compare dates????
waiting for some1 to reply & help me out pls...
|
|
|
|
|
hai
this is a sample code. check whether this wld help to solve ur prob.
Dim t1 As New DateTime(100)
Dim t2 As New DateTime(20)
If DateTime.Compare(t1, t2) > 0 Then
Console.WriteLine("t1 > t2")
End If
If DateTime.Compare(t1, t2) = 0 Then
Console.WriteLine("t1 == t2")
End If
If DateTime.Compare(t1, t2) < 0 Then
Console.WriteLine("t1 < t2")
End If
|
|
|
|
|
Ofcourse you can compare two dates Ishwarya!
Now, lets say the dateofjourney is more than 30 days then display a message like 'Booking Not Open'.
If the dateofjourney is less than 30 days then you do your calculations like say from Hyderabad to bangalore on 18th Feb there are 30 tickets available and custmer wants 5 tickets then you have to do 30-5.
so this way the tickets availabilty would be changed.....
basic idea!!!
Gautham
|
|
|
|
|
Hi All,
I have an Intranet built on Java and JSP pages, and I have an ASP file (default.aspx) which I need to open it inside this Intranet.
The problem that this file does not open correctly here, it onle shows the texts and does not show items like buttons. I don't know if there is a solution for this problem or not.
note: the ASP file is working correctly and does not have a problem if you open it inside a browser alone.
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
|
|
|
|
|
Are you saying you're trying to get Tomcat to run the file for you? It can't, its a Servlet container - as in Java?! The aspx file needs to be run through IIS on a machine with the .NET framework installed.
|
|
|
|
|
Quite new to this
Open Visual Studio .NET 2003
Select "New Project"
Selact "ASP .NET Web Application", give it a name
receive error:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'WebApplication1.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="WebApplication1.Global" %>
Where did I go wrong?
|
|
|
|
|
This error occurs when you create a new web application in asp.net using visual studio.net and without compiling the application, you try to browse a page in the application.
This occurs because of the Application DLL not having been formed.
asp.net will look in the Global Assembly Cache, and then in the application's local bin directory. If it can't find the class with the name you specified then it won't load. When you do a codebehind file in Visual studio, you are writing a base class for your aspx file to inherit from - the HTML template you write in the aspx is inlined into the dynamically generated subclass's Render method.
Even if you don't put any code in your page, you still need to compile it as long as you put the Inherts Webappname.Global in your Page directive.
To resolve this, Built the application using Ctrl + Shift + B or use F5 to build the application and then try to browse the application. The error will be resolved.
Gautham
|
|
|
|
|
Thanks for the feedback, Itried to build tehapplication as you mention. It makes a WebApplication1.dll and a WebApplication1.Pdb file in teh \bin directory but I still get the same error...
Any other ideas?
|
|
|
|
|
We have a ASP.Net 1.1 application we are moving to ASP.Net 2.0. The resources for this application are embedded, and served up using a virutal HTTP module. For example, an image on a page would have a url of getimage.aspx?smiley.gif , and the actual smiley.gif image is embedded in a .dll as a resource. The module extracts and serves up the image when it is called.
In ASP.Net 2.0 I have implemented a VirtualPathProvider to do the same thing, and it appears to work but with 1 caveat: The first call to the resource is cached and that value is always used. So if I make a call to getimage.aspx?smiley.gif I get the correct image, but if I make the call again to (say) getimage.aspx?frowny.gif I get the smiley.gif image.
I have debugged this to the point I know that the 2nd call isn't coming through, and figure it is caching my virtual url after the first call. How can I stop this? I want it to never cache the getimage.aspx page (or at least to detect the parameters are different, which I would have thought it should be doing anyway)
Note: I have overridden GetCacheDependency to return Null, and it didn't change anything. I also tried overriding GetCacheKey, providing it unique keys for each call, to no avail.
Any help/insight on this?
Michael
Developer, Author, Chef
|
|
|
|
|
I have a scenario where I am creating a search screen in an application. I have several search criteria that can be used. The problem is that I want to validate against searching on totally blanks fields, at least one field needs to be completed before a search can be executed.
I want to use the asp.net validation controls to do this validation, as I don't really want to write my own Javascript to do it, and I want the validation to be client side. as the server side validation is the easier part anyway.
Has anybody got any idea's?
|
|
|
|
|
|
Hi everyone!
I am new to ASP.Net technology. I want to know what should I use as a development tool for ASP.Net application. Currently I am using Windows Notepad for simple exercises.
Thank you.
|
|
|
|
|
Well, Visual Studio is the obvious choice, or for somethnig free, the Web Developer Express Edition.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i am creating a web application in visual web dev express and am having troubles in configuring the site memberships, by which i can define which users wud be accessing wat pages of my site.
i open the Site configuration utility, and go to Providers > select single provider for all.. then i am prompted to a page where i have the provider name "Aspsqlnetprovider" . on clicking test.. i get this error
" Provider Management
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."
i have even config the aspnet_regsql thing.. but no luck..
IDE: visual web dev express
Db: sql server 2000
Kunal Piyush
|
|
|
|
|
Kunal P wrote: i have even config the aspnet_regsql thing.. but no luck..
Do you mean you added Membership features to an existing database? In that case you only need to add a membershipprovider to your app in the web.config file, set as default and with a connstring property set to a connectionstring which uses your database. You can find a sample membershipprovider declaration string in your machine.config file. I recommend copy + paste, and then change the connectionStringName property from LocalSqlServer to you connection string.
|
|
|
|
|
well.. i did configure the aspnet_regsql thing... and it created a new databasse by the name "aspnetdb"
the main thing is that i do not have SQL server 2005 express.. is it possible to link it with sql server 2000
Kunal Piyush
|
|
|
|
|
If you run aspnet_regsql without parameters it has a nice GUI (at least with VS2005), where you can add membership features to an existing database instead of creating a new one.
|
|
|
|
|
hi can you help me with this?..
i have
in my class table--
classcode nvarchar,
teacher nvarchar,
room nvarchar,
TimeStart dateTime,
TimeEnd dateTime,
in my input for example--
class1 teacher1 room1 Feb-02-2007 8:00:00 AM Feb-02-2007 18:00:00 PM
If another class will be inserted it should not be in between the timestart and the timeEnd or else shows some error.The teacher should have training after the timeEnd and the room should be occupied after the training.
this input shoud not be accepted---
class2 teacher2 room1 Feb-02-2007 9:00:00 AM Feb-02-2007 18:00:00 PM
Bernie Leynes
|
|
|
|
|
This problem is usually because the machine.config contains a connection string element named LocalSqlServer which by defualt points to SQL Express. In you web.config you can override this by something like this.
<connectionStrings>
<clear/>
<add name="LocalSqlServer" ...
</connectionStrings>
Clear the connectionStrings inherited from machine.config, then add your own pointing to the database you have setup.
only two letters away from being an asset
|
|
|
|
|
hi. i did as said by you..
as for now the error regarding provider management has disappeared.. it has succeeded to establish a connection with the server.
but the problem at hand now is that the Security Tab is still not working. I get a error
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Could not find
stored procedure 'dbo.aspnet_CheckSchemaVersion'.
though its interesting to note that when i checked the database aspnetdb.. it contained a table names aspnet_CheckSchemaVersions..
ya. there was a diff in spelling..
Kunal
|
|
|
|
|
You need to run aspnet_regsql on your database to install the tables and procs necessary for membership, profile, etc.
only two letters away from being an asset
|
|
|
|
|
We have developed a web project in Asp.Net and we have not used any third party controls. We are about to install the same in the client machine.
The installation in client machine went well but the issue is we are not able to see the Data grid alone that we have used in our application. We are not able to visualize the issue as we have not used any special controls.
Note: We are able to see the form with all controls except Datagrid. We have used the Setup deployment that has been supported by Microsoft IDE.
Please let us know whether we need to perform anything special for it...
Configuration details
Deployment Platform - Windows XP
Language Developed - Asp.Net 1.0
Code behind Language - VB.Net
Thanks in Advance
Regards,
Anandan k
|
|
|
|