|
Yes I am also agree with previous answers, in your case you need to do paging in your database side and each paging time you need to bind grid with new fatched from DB.
For paging in Database you can use below logic
select top x * from dbo.EmpDetails where ID not in (select top (x*(p-1))ID from dbo.EmpDetails order by ID)
order by ID
Here X = No records per Page
P = Page no.With Regards,
Amit Patel
91-9328488961
India
|
|
|
|
|
Hello All,
I've been tasked with the oh so fun requirement of building a dynamic run time report creator for clients. We basically need to show a small sub set of tables, and allow them to generate reports by picking what data, columns, ect they want in the report. Although it doesn't seem super difficult, I'm wondering if anyone has run across an article or tool that helps do this. I spent some time searching the boards and forums which had alot of reporting items, but not real examples of a basic little run time report generator.
Any suggestions would be greatly appreciated!
Thanks,
Ryan
|
|
|
|
|
|
I don't have any tips or resources for you, but I had to do this same thing about a year ago. It started out as a simple app where the user would select the data tables and columns to see, then the users wanted the ability to write custom filters (custom where clauses for the select statements), and reorder the data, and group the data, and have embedded sub reports, and have static page headers and footers, etc, etc. It turned into a huge project. Good luck! Don't blame me. I voted for Chuck Norris.
|
|
|
|
|
Hi All,
We are developing a intranet web application in asp.net where we need to provide users to edit the pdf files. In order to edit pdf files does we need to have adobe acrobat professional only on the server or we need to have it on every client machine. Can we get any free better pdf editor other than adobe acrobat professional.If anyone already used any better pdf editor please let me know...Thanks for your help
|
|
|
|
|
I am not familiar with any PDF editing software other than Adobe Acrobat, so I cannot make any suggestions in that regard. I think I see a problem in your requirements, though.
The file is being retrieved through intranet. That retrieval is being done by the web browser, which simply passes it along to an application designated locally to handle PDF documents, so every possible workstation would have to have its own (hopefully licensed) copy of whatever application you will be using.
Some Adobe products, but not all, will allow the user to save the document as transmitted to their local machine. Some, but not all, will allow the user to add or edit information in form fields and save the revised document to the local machine. I have never seen any Adobe product that will push a document back to the server. And even if there were, you would run into concurrency problems, where two people try to push different versions of the same document back.
I would think a better solution would be to use a regular network rather than an intranet, and save the documents in a source control repository such as Visual Source Safe. The person who is editing the document can check out a copy to their local machine (which avoids the concurrency problem, as only one person will have an editable copy), make their edits and then check it back in. The source control handles transferring the document over the network, and provides a back-up in case you need to roll back to an earlier version. This is what my company does. Many of our online forms are PDFs; they get edited locally and saved back to VSS. When the document is done, we go to the web server and "get latest" from VSS into our live site.
|
|
|
|
|
Have you looked at Microsoft InfoPath? It handles Documents and server/client side stuff. Not sure if it meets your needs but it does allow editing of forms like pay checks, work orders and other stuff the form just needs to be made and it handles the rest.
|
|
|
|
|
I was at a job interview the other day and was asked how I would define a html table with the following attributes.
table needs to be 300px by 300px
Three rows - each 100px tall
one column in the first row taking up the entire row
two column's in the second row, each 150px
three column's in the third row, each 100px
I said "uhhhhhhh", do I add another one row table to each column and then split the "inner" tables as required? Well, that was not the answer they were looking for.
How would I do this? I thought the interview was going to be on SQL server and C# but this question came out of left field so to speak and I would like to know a way to accomplish this.
Thanksmodified on Wednesday, March 3, 2010 5:30 PM
|
|
|
|
|
|
Your table would actually be six cells wide with each cell 50px;
colspan=6
colspan=3, colspan=3
colspan=2, colspan=2, colspan=2
|
|
|
|
|
Thanks for the tip, it actually works! If you ever need a SQL server question answered give me a holler
Code snip from VS2005, I added borders so I could "see" the cells.
<table style="width: 300px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;">
<tr>
<td colspan="6" style="border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid; height: 21px;">
</td>
</tr>
<tr>
<td colspan="3" style="height: 21px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;">
</td>
<td colspan="3" style="height: 21px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;">
</td>
</tr>
<tr>
<td colspan="2" style="width: 100px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid; height: 21px;">
</td>
<td colspan="2" style="width: 100px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid; height: 21px;">
</td>
<td colspan="2" style="width: 100px; border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid; height: 21px;">
</td>
</tr>
</table>
-- Modified Wednesday, March 3, 2010 8:58 PM
|
|
|
|
|
so,i haved same promblem,thank you .
|
|
|
|
|
Hi All,
I'm just looking at the Mvc framework for the first time.
The job at hand is that I have an ASP.NET website that uses Mvc.
The website itself has no requirement for a UI it just listens for POST requests and then uses the Mvc UpdateModel to take data from the POST request and put it in a database.
Struggling a little bit at the moment. If anyone has any useful links on where to start with this it would be really appreciated.
Thanks,
|
|
|
|
|
|
|
Hi,
See my code for importing data from excel sheet.I have problem with importing data which contains in one column all record in digit except one is in charecters. The row containing charecters in that perticular column is not imported.
<br />
string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + pathName + @"\" + fileName + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1;\"";<br />
OleDbConnection ExcelConnection = new OleDbConnection(excelConnectionString);<br />
OleDbCommand ExcelCommand = new OleDbCommand();<br />
ExcelCommand.Connection = ExcelConnection;<br />
OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter(ExcelCommand);<br />
<br />
ExcelConnection.Open();<br />
<br />
DataTable ExcelSheets = ExcelConnection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables,null);<br />
<br />
<br />
string SpreadSheetName = "[" + ExcelSheets.Rows[workSheetNumber]["TABLE_NAME"].ToString() + "]";<br />
<br />
ExcelCommand.CommandText = @"SELECT * FROM " + SpreadSheetName;<br />
ExcelAdapter.Fill(ExcelDataSet);<br />
In my "Password" colomn all record contains digits but one record contains charecters.
At a time of debuging, i have found record contains NULL value. I have done lots of googling for this problem but still face this problem.
My registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
key ImportMixedTypes=Text.!- F - R - I - E - N - D - S -!
|
|
|
|
|
The excel driver makes an assumption about the data type of each column based on the data in the first 8 rows. If you mix data types in the same column you need to format your excel sheet properly to get the data type set correctly.
Related MS KB article[^]
|
|
|
|
|
Actually my client is upload excel sheet. I can't format cells in every sheet. is it any way to format excel sheet column? or any other Extended Property is there? !- F - R - I - E - N - D - S -!
|
|
|
|
|
|
Hi...
I am using asp with c#. I am doing an application for upload image files via ftp. how to i do this?
Any help will be appriciated...
thanks...G.Paulraj
|
|
|
|
|
|
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm6.aspx.vb" Inherits="MyData.WebForm6"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm6</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<ASP:panel id="FileUploadForm" visible="true" runat="server">
<FORM id="Form2" method="post" encType="multipart/from-data" runat="server">
<P><INPUT id="loFile" type="file" name="loFile" runat="server"></P>
<P>
<asp:TextBox id="dir" runat="server"></asp:TextBox><BR
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button><BR>
</P>
</FORM>
</ASP:panel>
<ASP:panel id="AnswerMsg" visible="false" runat="server">
<ASP:label id="FileName" runat="server"></ASP:label>
<BR>
<ASP:label id="FileLength" runat="server"></ASP:label>
<BR>
<ASP:label id="FileType" runat="server"></ASP:label>
<BR>
</ASP:panel>
</body>
</HTML>
.vb
Imports System.IO
Imports System.Data
Public Class WebForm6
Inherits System.Web.UI.Page
#Region "
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents FileUploadForm As System.Web.UI.WebControls.Panel
Protected WithEvents FileName As System.Web.UI.WebControls.Label
Protected WithEvents FileLength As System.Web.UI.WebControls.Label
Protected WithEvents FileType As System.Web.UI.WebControls.Label
Protected WithEvents AnswerMsg As System.Web.UI.WebControls.Panel
Protected WithEvents loFile As System.Web.UI.HtmlControls.HtmlInputFile
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents dir As System.Web.UI.WebControls.TextBox
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lstrFileName As String
Dim lstrFileNamePath As String
Dim lstrFileFolder As String
If dir.Text <> "" Then
lstrFileFolder = dir.Text
Else
lstrFileFolder = "c:\"
End If
Dim files As System.Web.HttpFileCollection = System.Web.HttpContext.Current.Request.Files
Dim postedFile As System.Web.HttpPostedFile = files(0)
lstrFileName = System.IO.Path.GetFileName(postedFile.FileName)
lstrFileName = Path.GetFileName(lstrFileName)
If (Not Directory.Exists(lstrFileFolder)) Then
Directory.CreateDirectory(lstrFileFolder)
End If
lstrFileNamePath = lstrFileFolder & lstrFileName
loFile.PostedFile.SaveAs(lstrFileNamePath)
FileName.Text = lstrFileName
FileType.Text = loFile.PostedFile.ContentType
FileLength.Text = CStr(loFile.PostedFile.ContentLength)
FileUploadForm.Visible = False
AnswerMsg.Visible = True
End Sub
End Class
April
Comm100 - Leading Live Chat Software Provider
|
|
|
|
|
Hi...
Thanks for your reply.
I am using c#. so can you please send the code snipt in c#?
thanks...G.Paulraj
|
|
|
|
|
I have an asp.net application hosted in localhost with backend as sql express. An sql server 2008 database with same structure is hosted in a remote server. I have to synchronize these two databases. What is the best way to do this? Can I do it with sync framework? Please suggest me a solution for this.
|
|
|
|
|
How about Backup the remote server and Restore it to the local? Or you could export the data from the remote server and import it back in locally - there are a number of ways to accomplish that. There are a number of other ways that also come to mind but those are probably the easiest and quickest (depending n the size and disposition of the databases).Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|