|
did you check the connection string ?
|
|
|
|
|
Add this to your web config
<connectionStrings>
<clear />
<add name="LocalSqlServer" connectionString="your connection string"
providerName="System.Data.SqlClient" />
</connectionStrings>
Notice that name=LocalSqlServer, it must be left with that name if you want to use the membership provider with default values
Alexei Rodriguez
|
|
|
|
|
thanks for help,
the code in the web.config is
<add name="ConnectionString" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True;User Instance=True">
providerName="System.Data.SqlClient" />
i need to host this site.so i need to change aspnetdb.mdf to other name.
what is the best solution for this problem
|
|
|
|
|
I don't know how to fix this, I tried setting:
<httpruntime executiontimeout="9000"/> but still not working.
The problem is that I'm using a Typed Dataset to call the stored procedure that actually inserts the records in the table. But the problem is that the file itself contains 11,000 records so it takes a long time to import it and then connection timeout occurs from the ISA server.
Is there anyway to fix this?
|
|
|
|
|
I want to have the following functionality..
When i type something in the box, the items matching the typed letters should be automatically detected. And, i should be able to select one from them.
I am looking for something similar to combobox.
please go thru the link..
<a href="http://easylistbox.com/demoCombo.aspx">http://easylistbox.com/demoCombo.aspx</a>[<a href="http://easylistbox.com/demoCombo.aspx" target="_blank" title="New Window">^</a>]
Can u please help me in this regard.
modified on Thursday, October 9, 2008 4:41 AM
|
|
|
|
|
This is perfect for you:
AJAXAutoComplete
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Perfect Example
|
|
|
|
|
hi,
I m not able to read the smtp setting from web.config
here is the code
Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("/web.config");
MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings") as MailSettingsSectionGroup;
if (mailSettings != null)
{
//port = mailSettings.Smtp.Network.Port;
host = mailSettings.Smtp.Network.Host;
password = mailSettings.Smtp.Network.Password;
username = mailSettings.Smtp.Network.UserName;
}
web.config:
<system.net>
<mailsettings>
<smtp deliverymethod="Network">
<network host="mail.yashsoftech.com" password="111111" username="1111@yashsoftech.com">
its always coming null values.
any suggestion why?
regards
Vijay V.
Yash Softech
|
|
|
|
|
Try like this,
VijayVishwakarma wrote: Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("/web.config");
Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("~");
MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings") as MailSettingsSectionGroup;
|
|
|
|
|
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
|
|
|
|