|
Hi
I have created a web page that reads excel file it's working file in Excel 2003 files, when I am trying to open Excel 2007 it hangs(If I run the page from VS 2005 then it first display 'file conversion Box' and then reading the excel file.if I am accessing through IIS its hanging)
I am attaching my code below
Excel.Workbook theWorkbook = ExcelObj.Workbooks.Open(filename, 0, true, 5,"", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, true, true);
I am using MS Excel 11.0 Object library
thanks
|
|
|
|
|
This is because of Permission issues. Please Google for setting up proper permission to use Excel files.
|
|
|
|
|
Possibly consider using OLEDB to access the Excel file, bit lighter...
|
|
|
|
|
i am using indexing service for search
but i am not getting proper result for excel
sheet when i search for text in excel sheet but working
properly for word and pdf file
|
|
|
|
|
And this has what to do with asp.net? Have you tried google? As a clue, in XP by default it only searches some file types, you have to change the registry to search all types, but I cannot remember which.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
On my homepage, I've got an asp:LoginView control with 3 roles in it. What I'm trying to do is having my own login screen (textboxes and buttons) and not use the asp:Login control. But the problem is I need to change the logged in user's role for the LoginView control to work.
I'm using a normal access database to check if it's a valid user and then gets the user's Role from it.
Is it possible to set the asp:RoleGroup in the login page from the Role that I have received from my database so that my LoginView on the Homepage would work?
Thanks
|
|
|
|
|
Hi, thanks for looking
It kind of messy to modify connection strings when they are not in the same place
Im using sqlserver for the session
<sessionState
mode="SQLServer"
timeout="30"
cookieless="AutoDetect"
allowCustomSqlDatabase="true"
sqlConnectionString="Data Source=(local)\SQL2005; DataBase=DB; Integrated Security=True"
regenerateExpiredSessionId="false">
</sessionState>
I would like to add a providers section, just as we do it profiles:
<providers>
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="LocalSqlServer"
applicationName="App"/>
</providers>
But i cant find the right way to do it.
Is it even posible??
Thanks for your time
Alexei Rodriguez
|
|
|
|
|
Hi all, thanks for looking
My site is using sqlserver session state, Everything is working fine
I have the aspstatetemapplications and aspstatetempsession in the same database as my whole system
I noticed that there are a lot of records in the aspstatetempsession table
Arent they removed automatically when they expire??
Also, i noticed that session data doesnt expire
I mean, i set the timeout to 30, if i dont move anything for more than 30 minutes, and after this i make a request from the same page, the session data is still there
Shouldnt the data be ignored and a new session created or at least erase session data??
I already tryed setting regenerateExpiredSessionId to tru and false and it doesnt make any difference
Alexei Rodriguez
|
|
|
|
|
Hi..
i am trying to develop page with Gidview. This Gridview has a textbox in Template field. when user enter an amount in Textbox he should be able to see the running Total of all the text boxes amounts. Initially i was able to do it using javascript. Javascript function was called for OnChange Event of TextBox. But the real problem happened when i was asked to include paging for the GridView . By using paging i was able to display only running total for that single page. I need total including amounts on other pages. Is there any way to accompolish it. Any help is really appreciated.
Thanks,
Ram.
The Beginer..
|
|
|
|
|
One way to solve this can be,
- Calculate the sum of other pages values and having it in a hidden field.
- Now use the same JavaScript methodology.
|
|
|
|
|
hi Castle rider,
thanks for your reply.can you give code example of your answer. i am giving here more details of my question. i need to display running total of all the textboxes in GridView in the lable at bottom of gridview. this should include textboxes on other pages of gridview too.
<asp:GridView ID="gv_Transaction" runat="server" AutoGenerateColumns="False" Width="80%" HorizontalAlign="Center" CellPadding="4" GridLines="None" ShowFooter="True">
<FooterStyle HorizontalAlign="Center"/>
<asp:BoundField HeaderText="Employee Name" DataField="Ename" SortExpression="Ename">
<ItemStyle Width="100px" />
</asp:BoundField>
<asp:BoundField HeaderText="SSN" DataField="ssn" SortExpression="ssn" >
<ItemStyle Width="80px" />
</asp:BoundField>
<asp:TemplateField HeaderText="Amount" >
<ItemTemplate>
$ <asp:TextBox ID="txt_dollar" runat="server" Width="60px" MaxLength="12" style=" text-align:right;" CausesValidation="true" onChange="Add()" /b>gt;</asp:TextBox>
<asp:RegularExpressionValidator ID="reg_dollar" runat="server" ValidationExpression="^\d*\.?(\d{2})$" ErrorMessage="<b>Incorrect Format</b>" SetFocusOnError="true" Display="Dynamic" ControlToValidate="txt_dollar">
<asp:ImageButton ID="img_amt" runat="server" ImageUrl="~/Images/error.gif" AlternateText="Incorrect Format" />
</asp:RegularExpressionValidator>
</ItemTemplate>
<ItemStyle Width="80px" />
</asp:TemplateField>
<asp:BoundField HeaderText="Status" DataField="status" SortExpression="status">
<ItemStyle Width="60px" />
</asp:BoundField>
</Columns>
</asp:GridView>
And at bottom i have a label showing total amount
<td style="width:10%; text-align:right; color:#2572a7;">Total Dollar Amount:</td>
<td style="width:15%;color:#2572a7; "><asp:Label ID="lbl_TotAmount" runat="server"></asp:Label></td>
I am calling this Javascript function on Onchange Event of Textbox in the grid.that does the addition is
var obj = window.event.srcElement;
var tBox;
var sum = 0;
if(obj.tagName == "INPUT" && obj.type == "text" )
{
tBox = document.getElementsByTagName("INPUT");
for(i = 0; i< (tBox.length - 2) ; i++)
{
if(tBox[i].type == "text")
{
if ((parseFloat(tBox[i].value)) && tBox[i].id !="ctl00_ContentPlaceHolder1_payDate_txt_Date" )
{
sum += Number(tBox[i].value);
}
}
}
}
sum=sum.toFixed(2).toString(10)
document.getElementById("ctl00_ContentPlaceHolder1_lbl_TotAmount").innerText = sum;
Once again Thanks for your reply...
The Beginer..
|
|
|
|
|
I really dont know if this is the best place to ask this question but here it goes...
Background Information:
I am creating template C# 2008 web sites that contain different modules. I may have web sites A, B, C, D, etc that each contain different modules. A module could be a couple different things. It could be a GUI change such as a side panel on the main web page like in code project on the left where it says chapters, Announcements, etc. Another example could be new web pages like a shopping cart with paypal or google checkout. Another would be web site polling such as the one on www.PollPro.com while would be code changes and additional web pages. A module could mean C# server side code changes to files, HTML code changes, and or including of files that dont exist, and or changes to the SQL Server the web site is using.
The Question:
What is the best way to start accomplish this in a very maintainable way?
Possible Answers:
1. Create a base web site that contains no modules at all. Then within the code place sections that could be between commented sections like // GOOGLECHECKOUTMODULE_BEGIN and // GOOGLECHECKOUTMODULE_END . Then build an application that will remove all the sections and a specified list of files if the module is not selected. The problem with this is that other modules could be using the same files. Another problem is that this project would become a maintaince nightmare with all the different commented sections.
2. Create a base web site that contains no modules at all. Then copy that project and add only one module. Then when a module is selected the two projects need to be merged together. This would include merging files and adding files that dont exist. Merging coded files may be a little work but is possible. If different modules contain the same file name that needs to be added then which one is used?
Any other options?
|
|
|
|
|
Currently i m working on a table which have n level structure
(it has Process name and Parentprocess Name in it)
So his way i defined n level of it
now thrugh cursor i want to fetch and i only do have 0'th level
Process Name
thrugh cursor i only do get one level Sub process
(i need sthin like while loop )
how to do it
|
|
|
|
|
What has this to do with ASP.NET? It sounds like a sql problem. If you have SQL Sevrer 2005/2008 google for CTE (Common Table Expression), it does exactly what you are looking for.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You can do this in asp.net instead of in sql server
Load all the records and implement a function which you will call recursively to populate your data in any desired way
Alexei Rodriguez
|
|
|
|
|
HY,
i wanted to show de contents of a csv(comma separated file) file on a gridview(asp.net using c#)..can any one plz help me out
|
|
|
|
|
Read the file, load it into a collection or data table and use that as the data source for the grid view.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You can use TextFieldParser class to do your task.
Something like this,
TextFieldParser fp = new TextFieldParser("mycsv.txt");
fp.Delimiters = {"\t"};
while (!fp.EndOfData)
{
}
|
|
|
|
|
In my .net projects I always tend to have an n-tier architecture.
I access the business layer from the presentation layer using references and code.
It seems the object data source does a similar task.
Am I right?
I have seen the object data source in action but it seems to me it does the same thing as what I am doing to access the business layer.
Am I right?
What do you think?
Thanks
|
|
|
|
|
Hello,
I am developing Intranet web site. run on IIS. I have a txt file save on server inculde 'n' no of lines. when this txt file upload on server and save on sql server then no probleam. Client access my web site and client Computer have a txt file. when client upload txt file. then show message file not found.
|
|
|
|
|
So are you saying a client is trying to upload a file to your server or are they trying to download it from your server?
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Rinki Mukheraji wrote: I have a txt file save on server inculde 'n' no of lines.
Does this means, you the have the text file in the Server first?
Rinki Mukheraji wrote: when client upload txt file. then show message file not found.
Seems like your using FileUpload Control's FileName property to upload the client file. Use PostedFile property.
|
|
|
|
|
Hi, I'm trying to write a program that can access different databases(mainly Sql Server and Oracle).
I've thought about using the Database Application Access Block which seems to be the best way but can't find a decent example of how to use it with oracle. If anyone has any other ideas on how to accomplish this please let me know.
Thanks
|
|
|
|
|
I would like to add a control to a panel during runtime;
this is what im doing
TextBox str = new TextBox();
str.id = Test;
str.Width = Unit.Pixel(100);
str.Height = Unit.Pixel(100);
this.Panel3.Controls.Add(str);
to my suprise this conrol is not being added;
does anyone know whats wrong with this code;
|
|
|
|
|
What event are you adding the control in? Page_Load
Be careful where the controls are you have to take in to account postback
A good article to read would be on Page Life Cycle
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|