15,891,431 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mydsh (Top 16 by date)
Mydsh
9-Feb-16 1:43am
View
Deleted
Hello Manas, I need your help again, the above xslt works great and now I need to do pagination.display 20 records in each page. I tried and code is as below, my code is not working,please check , am passing the parameters from c# code.
Thanks in advance.
what I tried
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes">
<xsl:param name="Page">
<xsl:param name="PageSize">
<xsl:param name="PageURL">
<xsl:template match="node()|@*" name="identity">
<xsl:copy>
<xsl:apply-templates select="node()|@*">
<xsl:template name="results" match="/">
<xsl:variable name="mycount" select="count(root/Keyword_Details)">
<xsl:variable name="selectedRowCount" select="floor((number($mycount)-1) div $PageSize)+1">
<!--Start Pagination logic -->
<html>
<style>
.alternative_cls:nth-child(even){
background:#ccc;
}
</style>
<!-- Pagination logic -->
<xsl:for-each select="root/Keyword_Details">
<xsl:if test="position() >= ($Page * $PageSize) + 1">
<xsl:if test="position() <= $PageSize + ($PageSize * $Page)">
<div class="alternative_cls" style="padding-left: 30px; padding-top:1px;padding-bottom:0.5px;width=500px" >
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="casename">
(<xsl:value-of select="date">)
</div>
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="docket">
</div>
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="court">
</div>
<br/>
<br/>
<br/>
</div>
<!--End Pagination logic -->
<!-- Prev link for pagination -->
<xsl:choose>
<xsl:when test="number($Page)-1 >= 0">
<xsl:attribute name="href">
<xsl:value-of select="$PageURL">?page=<xsl:value-of select="number($Page)-1">&pagesize=<xsl:value-of select="$PageSize">
<<Prev
<xsl:otherwise>
<!-- display something else -->
<!-- Prev link for pagination -->
<xsl:if test="$selectedRowCount > 1">
<xsl:value-of select="number($Page)+1"> of <xsl:value-of select="number($selectedRowCount)">
<!-- Next link for pagination -->
<xsl:choose>
<xsl:when test="number($Page)+1 < number($selectedRowCount)">
<xsl:attribute name="href">
<xsl:value-of select="$PageURL">?page=<xsl:value-of select="number($Page)+1">&pagesize=<xsl:value-of select="$PageSize">
Next>>
</html>
Mydsh
9-Feb-16 1:29am
View
Deleted
Hello Manas, I need your help again, the above xslt works great and now I need to do pagination.display 20 records in each page. I tried and code is as below, my code is not working,please check , am passing the parameters from c# code
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes">
<xsl:param name="Page">
<xsl:param name="PageSize">
<xsl:param name="PageURL">
<xsl:template match="node()|@*" name="identity">
<xsl:copy>
<xsl:apply-templates select="node()|@*">
<xsl:template name="results" match="/">
<xsl:variable name="mycount" select="count(root/Keyword_Details)">
<xsl:variable name="selectedRowCount" select="floor((number($mycount)-1) div $PageSize)+1">
<!--Start Pagination logic -->
<html>
<style>
.alternative_cls:nth-child(even){
background:#ccc;
}
</style>
<!-- Pagination logic -->
<xsl:for-each select="root/Keyword_Details">
<xsl:if test="position() >= ($Page * $PageSize) + 1">
<xsl:if test="position() <= $PageSize + ($PageSize * $Page)">
<div class="alternative_cls" style="padding-left: 30px; padding-top:1px;padding-bottom:0.5px;width=500px" >
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="casename">
(<xsl:value-of select="date">)
</div>
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="docket">
</div>
<br/>
<div style= "float:left;font-family: Times New Roman">
<xsl:value-of select="court">
</div>
<br/>
<br/>
<br/>
</div>
<!--End Pagination logic -->
<!-- Prev link for pagination -->
<xsl:choose>
<xsl:when test="number($Page)-1 >= 0">
<xsl:attribute name="href">
<xsl:value-of select="$PageURL">?page=<xsl:value-of select="number($Page)-1">&pagesize=<xsl:value-of select="$PageSize">
<<Prev
<xsl:otherwise>
<!-- display something else -->
<!-- Prev link for pagination -->
<xsl:if test="$selectedRowCount > 1">
<xsl:value-of select="number($Page)+1"> of <xsl:value-of select="number($selectedRowCount)">
<!-- Next link for pagination -->
<xsl:choose>
<xsl:when test="number($Page)+1 < number($selectedRowCount)">
<xsl:attribute name="href">
<xsl:value-of select="$PageURL">?page=<xsl:value-of select="number($Page)+1">&pagesize=<xsl:value-of select="$PageSize">
Next>>
</html>
Mydsh
27-Jan-16 2:31am
View
Great!!! Thanks a lot
Mydsh
27-Jan-16 1:55am
View
Thank You, but how do I link the url which are between link tags.
in the above xml we have <link> www.google.com </link>, that is casename and date as hyperlinks
Mydsh
1-Dec-12 11:18am
View
Here is my backend code
string ConnectionString = System.Configuration.ConfigurationManager.AppSettings["dbconnect"];
NewDAL dalObj = new NewDAL();
private DataSet dataSet;
protected void Page_Load(object sender, EventArgs e)
{
string MODE = Request.QueryString["MODE"];
ClientScript.RegisterHiddenField("__EVENTTARGET", "lbtn_search");
if (Session["CurrentFilter"] == null)
{
Session["CurrentFilter"] = "ALL";
}
HttpContext.Current.Session["PathLineMsg"] = "List of Relationship(s)".ToString();
BindData();
if (MODE == "HTML")
{
HTMLReport();
}
if (MODE == "PDF")
{
PDFReport();
}
if (MODE == "PRINT")
{
PrintReport();
}
private void HTMLReport()
{
int RelationsID = Convert.ToInt32(Request.QueryString["Rid"]);
HttpContext.Current.Session["RelationsID"] = RelationsID;
HtmlRendering(RelationsID);
//ClientScript.RegisterStartupScript(this.GetType(), "string", "javascript:PrintResults();", true);
}
if (impersonateValidUser("MSWord", "", "abcd123!"))
{
lblError.Visible = false;
WordApp oWord = new WordApp();
oWord.OpenAndPrint(wordPath, pdfpath);
undoImpersonation();
while (System.Diagnostics.Process.GetProcessesByName("WINWORD.EXE").Length > 0)
{
System.Windows.Forms.Application.DoEvents();
System.Threading.Thread.Sleep(100);
}
ReadPdfFile(pdfpath);
}
Mydsh
5-Sep-12 13:15pm
View
Tried to change the sshortdate in the registory editor but it is of no use
Mydsh
31-Aug-12 11:08am
View
yes its hosted in the server,but am not sure if port 81 available and if i paste http://118.139.161.77:81/Service1.svc am not able to see test client.
Mydsh
28-Aug-12 6:46am
View
Tried with that too,bit its not working for the second connection string
Mydsh
28-Aug-12 1:27am
View
enabled all,but not working
Mydsh
28-Aug-12 1:27am
View
I tried connecting locally its not working.and also made changes in the server but still it is not connecting
Mydsh
28-Aug-12 1:14am
View
am getting this error
Fetch Error:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Mydsh
28-Aug-12 1:13am
View
i tried adding the ip address,but still it not working
Mydsh
28-Aug-12 1:07am
View
Am using both connection strings in my application,its working fine locally,but not in server
Mydsh
28-Aug-12 1:04am
View
webconfig is as follows:
connectionStrings>
add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"
add name="Connection1" connectionString=" data source= testComp;Database=Testdata;User ID=sa;Password=abcdef"
add name="Connection2" connectionString="metadata=res://*/testModel.csdl|res://*/testModel.ssdl|res://*/testModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source= testComp;Initial Catalog=Testdata;Persist Security Info=True;User ID=sa;Password=abcdef;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient"
connectionStrings
providerName="System.Data.EntityClient"
Improve solution Permalink |
Posted 1 sec ago
Mydsh223
Mydsh
9-Aug-12 5:06am
View
Thank You
Mydsh
9-Aug-12 1:43am
View
I want to bind images horizontally in listview how to do it using c# asp.net
Show More