|
hi sir the concept whic u are saying is quite intersting...plz help in this regrds by giving the best site abt paging in the database
|
|
|
|
|
lakshmichawala wrote: hi sir the concept whic u are saying is quite intersting...plz help in this regrds by giving the best site abt paging in the database
Read these two article.
Article 1
Article 2[^]
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: another way is that, retrive all records when page is loaded,store dataset in cockie
Are you kidding ? a dataset which contains 45000 records and keeping it in cookie ! I don't think it is possible.
|
|
|
|
|
R u used Stored Procedure.
if not u might be use StroredProcedure , the command is still same but the stored procedure execute faster then simple command
i hope this will help u....
|
|
|
|
|
Hi
U c try to pageing the data in database it self.
Tanks
Siva
|
|
|
|
|
Hi,
I am using following code to generate report. I am using template for report header.It works fine. I want report should generate on individual sheet for each office. Currently Data of all sheet display on single sheet.
How i will add sheet dynamically for each office.
Private Sub CreateConsolidatedXLSheet(ByVal RptDate As String, ByVal endtime As String, ByVal conDate As String, ByRef ConsRptDS As DataSet)
Dim rpttype As String = "SummaryRpt"
Response.ClearContent()
'Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ".xls")
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ".xls")
Response.ContentType = "application/vnd.ms-excel"
Dim headerfile As String = Server.MapPath("Reports\Header_" + rpttype + ".html")
Dim hreader As System.IO.StreamReader = New System.IO.StreamReader(headerfile)
Dim headerdata As String = hreader.ReadToEnd()
hreader.Close()
Dim username As String = TTUser.GetDisplayNameFromDB(context.User.Identity.Name)
headerdata = headerdata.Replace("##curdate##", Format(CDate(RptDate), "MMMM-dd,yyyy"))
Response.Write(headerdata)
Dim drow As DataRow
Dim dcolum As DataColumn
Dim numcols As New ArrayList()
Dim slno As Int16 = 1
Dim LRow As String = ConsRptDS.Tables(0).Rows.Count.ToString
For Each drow In ConsRptDS.Tables(0).Rows
Response.Write("<tr>")
Dim colix As Int16
For colix = 0 To drow.ItemArray.Length - 1
Dim strnum As String = ""
If colix = 0 Then
Response.Write("<td x:str>")
Response.Write(drow(colix)) 'tz.GetPST(drow(colix)))
Response.Write("</td>")
Else
Response.Write("<td x:num >")
Response.Write(drow(colix))
Response.Write("</td>")
End If
Next
Next
Response.End()
End Sub
Binod K.
(Miles to go before I sleep)
|
|
|
|
|
This is the sample to create differenct sheets in same excel sheet
try this
Microsoft.Office.Interop.Excel.Application _excel;
Microsoft.Office.Interop.Excel._Workbook _wrkBk;
Microsoft.Office.Interop.Excel._Worksheet _excelSheet;
Microsoft.Office.Interop.Excel.Range _oRng;
//create an object og Excel Application.
_excel = new Microsoft.Office.Interop.Excel.Application();
_excel.Visible = false;
//Get a new workbook.
_wrkBk = (Microsoft.Office.Interop.Excel._Workbook)(_excel.Workbooks.Add(Missing.Value));
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.ActiveSheet;
Microsoft.Office.Interop.Excel._Worksheet _tempSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet1"];
int _defaultSheetCount = _wrkBk.Worksheets.Count;
for (int j = 0; j < dt.Rows.Count; j++)
{
if ((j + 1) <= _defaultSheetCount)
{
_excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet" + (j + 1)];
}
else
{
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.Sheets.Add(Type.Missing, _tempSheet, Type.Missing, Type.Missing);
}
_tempSheet = _excelSheet;
//write the data in the predefined format to the Excel Sheet.
_excelSheet.Cells[1, 3] = "test";
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hi,
how to divide each row of table in 48 cells Dynamically ?
Give me hint or example related to use of table.
thanks in advance
Rameez
|
|
|
|
|
rameez Raja wrote: how to divide each row of table in 48 cells Dynamically ?
Give me hint or example related to use of table.
Example
Table tbl=new Table();
TableRow tr=new TableRow();
TableCell tc;
for(int i=0;i<48;i++)
{
tc=new TableCell();
tc.Text=i.ToString() + "Number Of Cell";
tr.Cells.Add(tc);
}
tbl.Rows.Add(tr);
Take one PlaceHolder on the Page and Add this table
PlaceHolder1.Controls.Add(tbl);
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yesterday I installed .NET Blog Engine on my ISP web server.
It works pretty well and now I have 2 blog.
The only problem I noticed, if I don't connect to the web site for a couple of hours and try to access the web site again, there is a waiting period of about 10 seconds when I try to access it for the first time (in the new timeframe).
Is there anyway to speed up this startup time?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: if I don't connect to the web site for a couple of hours and try to access the web site again, there is a waiting period of about 10 seconds when I try to access it for the first time (in the new timeframe).
Blog engine will be doing caching and might have set very less cache timeouts. When you request after some hours, it might be reloading data to the cache.
Small delay in page load may happen when you request after an application restarts. So make sure application is not recycling frequently.
|
|
|
|
|
What do you mean by recyclicng frequently?
Well it's all good and fast, it is only after a few hours without use that I have this performance hit, it looks more like a dismissed cache after a while, as well as a recompilation of the app as well perhaps...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: a recompilation of the app as well perhaps...
I meant this.
AFAIK, when application recompiles, it leaves an entry in the event viewer. Check that if it is happening frequently.
|
|
|
|
|
I'm a total beginner, and I'm building a web app with VB.
I have a database in SQL 2005 and my application is trying to find a business.
The user enters a string in the textbox and with that string build a query to get the desired results.
For phone numbers it should be easier, with the exact phone number find the exact match and display.
But for business name it's a little more complicated.
How do I go about in doing that? Any help is appreciated.
|
|
|
|
|
I have created a SQLDataSource that connects to the database and retrieves the correct information I need.
But I want to be able to invoke the results in a ListView only when the user clicks the button.
Any help appreciated. Total beginner!
modified on Thursday, July 24, 2008 11:41 AM
|
|
|
|
|
I'm creating a search page that displays record summaries from multiple tables and has a link to the full records in the page for the table they're from. As a result I can't define the DataNavigateUrlFields and DataNavigateUrlFormatString fields at design time.
Is there a way to edit them from the .cs file that I'm not finding, or do I need to do something else to create the hyperlink column?
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
this is rashmi, asp.net developer ..
we are developing website name: www.discareuropa.com this has to develop in 2 language English & Español
we have converted english to Español..through google translator and html pages are working fine..
Problem:-
if we use server side control..then we are getting problem
1st Translator language from English to Español, you will notice every thing change to Español....then put user name: admin password: admin (left side)
and page will redirected to lighterBrand.aspx ..and page is auto refreshing and converting into Espanol, (as we want) ..but auto refreshing it is not stoping, ..so kindly help me how can i stop this...
thanks/rashmi
|
|
|
|
|
Think about the following scenario...
While loading the page 'LighterBrand.aspx' you are calling the function
convertnew('en|es');
Using following code <script language='javascript'>convertnew('en|es');</script>
And in the function 'convertnew'
49th line in the JS function
indexof_p = pattern.indexOf('|');
So value of 'indexof_p' will be greater than 0.
So if (indexof_p == -1) will return a false and the control go to else part.
<br />
else {<br />
var psplit = pattern.split('|');<br />
new_pattern = psplit[0]+'|'+psplit[1];<br />
if (psplit[1] == 'en') {<br />
isen = 1;<br />
}<br />
<br />
Here if (psplit[1] == 'en') is false because our pattern is 'en|es'
So that the variable 'isen' remains blank.
And in the following if condition
<br />
if (isen == 1) {<br />
thisurl = new_location;<br />
}<br />
else {<br />
thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;<br />
}<br />
<br />
if (isen == 1) is false because 'isen' not set to 1.
So else part will work.
thisurl = 'http://translate.google.com/translate_c?langpair=' + new_pattern + "&u=" + new_location;
Then 'open_in_same_window' is 0. So that
So control goes to following 'if'
<br />
if (CanAnimate ){<br />
msgWindow=window.open('' ,'_self','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');<br />
msgWindow.focus();<br />
msgWindow.location.href = thisurl;<br />
}<br />
else {<br />
msgWindow=window.open(thisurl,'_self','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');<br />
}<br />
<br />
Here In both case
msgWindow.location.href = thisurl;
OR
msgWindow=window.open(thisurl,'_self','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,menubar=yes,resizable=yes,left=0,top=0');
causes to open the page 'LighterBrand.aspx'
This causes to a call to the function 'convertnew('en|es');'
So that again the procedure that I explained will happen, Like a recursion
Hope this will help you.
|
|
|
|
|
During post back user1 gets user2 page. I am using cookiless form authentication in asp.net 2.0. How to prevent this problem ?
Thanks
|
|
|
|
|
Hello all!
I'm experiencing difficuties with the Date in ASP.NET. My project is written in C# and uses SQL queries. The problem is when the SQL query returns the date from the database it is different format from the one used in ASP.NET. Then the ASP generates mistake and I can't execute properly my program...The strangest thing is that happens only on my computer, so I guess it has something to do with some setting of the SQL server, but I can't find anything Please help me with this! Be free to ask any questions, because I'm sure I haven't explain properly the situation and I don't know what more info should I give you!
Thank you in advance!!!
|
|
|
|
|
|
Thank you for your quick answer, but I'm affraid that didn't help me We have multiple connections throw the project, but the method is connection dependent, a.k.a every time it connects it loses it's setting and that don't work for me. I need it to be permanent. And the command "set dateformat dmy" didn't work - the query return the wrong date...I don't know if I'm doing something wrong or this is just irreparable and there is something to do with the regional setting on my computer or something else...Because non of my co-workers have changed some setting at theirs SQL and they don't have my problem.
Please help!
|
|
|
|
|
Hi friends,
Iam trying to create a NUnitAddin for TestCase Builder after adding the required references in process i got the following error
Builder.Class1.SqlServerDatasourceAddIn' does not implement interface member 'NUnit.Core.Extensibility.ITestCaseBuilder.CanBuildFrom(System.Reflection.MethodInfo)'
Builder-is a placeholder for the name of your namespace
Class1-is a placeholder for the class name
|
|
|
|
|
Hi,
I am developing a website in which users register with their data. Immediately after registering a Unique number is generated.
So there is a chance of 3 or more users registering at the same time.
At that time concurrency problem will occur........How to avoid?
I am using SqlExpress as database and I wrote the code in Register Button click.....
Please help me....
Thanking you
McMilan.
|
|
|
|
|
Get the unique number in the global.asax session start
save it in session and use it when needed.
I didn't get any requirements for the signature
|
|
|
|