|
There is also a built-in control ChangePassword in the ASP.NET 2.0, you may consider replace it with another name, and the Codebehind attribute is depricated in the version 2.0.
|
|
|
|
|
I have 2 Repeaters with ProductCategory and ProductDetail Architecture..
i.e master detail
Wot i want to do is ... enable the paging as a whole rather than ProductCategory or ProductDetail .. Here is sample code for it
strSQL = "SELECT ProductID, ShortDesc, LongDesc, SubCategoryID, PictureUrl, ProductCatID, DataSheetUrl " & _<br />
" FROM dbo.Products ORDER BY ProductID"<br />
'& Request.QueryString("subid")<br />
strSqlMain = "SELECT ProductCatID, Description, SubCategoryID FROM dbo.ProductCategory Where SubCategoryID=" & Request.QueryString("subid")<br />
clsCon.MakeDataSet(strSQL, dsProduct)<br />
clsCon.MakeDataSet(strSqlMain, ds)<br />
ds.Tables(0).TableName = "Main"<br />
ds.Tables.Add(dsProduct.Tables(0).Copy())<br />
ds.Tables(1).TableName = "Products"<br />
Dim str1(0) As String<br />
Dim str2(0) As String<br />
Dim dr As DataRelation = New DataRelation("ProductCat", ds.Tables("Main").Columns("ProductCatID"), ds.Tables("Products").Columns("ProductCatID"), False)<br />
ds.Relations.Add(dr)<br />
rptCategory.DataSource = ds<br />
rptCategory.DataBind()<br />
clsCon.sqlConnection.Close()
And the ItemDataBound Event of Master Repeater is
Protected Sub BindChild(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs)<br />
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then<br />
If (CType(e.Item.DataItem, DataRowView).CreateChildView("ProductCat")).Count > 0 Then<br />
Dim rpt As Repeater = e.Item.Controls(3)<br />
Dim dsPaged As New PagedDataSource<br />
dsPaged.DataSource = (CType(e.Item.DataItem, DataRowView).CreateChildView("ProductCat"))<br />
dsPaged.AllowPaging = True<br />
dsPaged.PageSize = 7<br />
dsPaged.CurrentPageIndex = CurrentPage<br />
lblCurrent.Text = "Page: " & (CurrentPage + 1).ToString & " of " & _<br />
dsPaged.PageCount.ToString<br />
lblPrevious.Enabled = Not dsPaged.IsFirstPage<br />
lblNext.Enabled = Not dsPaged.IsLastPage<br />
rpt.DataSource = dsPaged<br />
rpt.DataBind()<br />
End If<br />
End If<br />
End Sub
now problem is It makes the Paging enable on Product Repeater meanz .. if i have a Categories like CAT-A CAT-B,CAT-C
and all of these categories has 10 items each .. then paging will work as
first page will populate with 7 records of A,B,C, each .. and on pressing Next link it will show rest of records of each category ..
eg
CAT-A
a
b
c
d
e
f
g
CAT-B
ba
bb
bc
|
|
bg
|
|
|
so on
on next page
CAT-A
h
i
j
CAT-B
bh
bi
bj
|
|
|
so on
but i want it to work as
First Page should show CAT-A with 7 records
on pressing next it should show Rest of 3 records for CAT-A and ultimately start CAT-B with 5 records and so on ..
LIKE
CAT-A
a
b
c
d
e
f
g
on next page
h
i
j
CAT-B
ba
bb
bc
bd
R A M
|
|
|
|
|
hi this is senthil from chennai i want know how to fetch top 3 rank in our students database
senthil
|
|
|
|
|
you can use the query top 3 in your query to get the desired result.
BTW this you could have better put in the ADO and SQL forum.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Write this
select Top 3 * from students order by Rank
Regards,
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
amit_chikara2002@hotmail.com
|
|
|
|
|
Dear Friends,
Hi
I want to include a javascript functions file in master,and then use those
functions in content pages,but it is not possible,It were working properly
before using master content page,I mean when all my code was in one page.
I appresiate anyone who can help
thanks.
zahra yousefi
yousefi105@yahoo.com
|
|
|
|
|
Define not working.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi there,
That's possible that you can link to a javascript file with some functions in the master page so that you can use them in the content page. I'm afraid that there's something wrong in your case, so you might be more specific how you use the client side file in the master page.
|
|
|
|
|
I know it seems like a silly question and a security risk.. but i could swear I caught a glimpse of an article recently about how to do this... and I cant find it in the CP articles.
Is it possible? and could anyone point me in the right direction please ?
|
|
|
|
|
Java or ActiveX.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi
1- How to use java script in master page at asp .net 2.0 ?
2- How can i make ATLAS or AJAX control ?
Best Regards
Hussein Madani Ghomi
- h_madani_gh@yahoo.com
- Madani@SatrapTeam.ir
(+98-912-5577-832)
|
|
|
|
|
1. You can use JavaScript in MasterPage in the same way as in other pages. MasterPage is just a HTML page.
2. look into documentation.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hussein Madani Ghomi wrote: 1- How to use java script in master page at asp .net 2.0 ?
Your question is vague, so you should be more specific, and CWIZO can give you more details. Anyway, the link may give you some hints:
Programming ASP.NET Web Pages with Client Script [^]
Hussein Madani Ghomi wrote: 2- How can i make ATLAS or AJAX control ?
Atlas[^]
|
|
|
|
|
1. Master pages have no relevance at all for the Javascript. It's only a tool for the server code to separate parts of the page.
2. AJAX is just a technique to request data from the server without reloading the page. There is no specific AJAX control.
ATLAS is an implementation for .NET that uses AJAX. Check the documentation for ATLAS on how to use it.
---
b { font-weight: normal; }
|
|
|
|
|
I am creating an web application which need to convert document files into
XML. Then read the xml files for specific words in specific format. I
am using Microsoft.Office.Interop for converting the document files to
xml .The files are getting generated but with lots of formating
information which leads to heavy file.
I need an help to write a code which can reduce the xml files by
removing the unwanted document formating. Or can be preserved if
required.
Thanks in advance.
Learner always
|
|
|
|
|
To get rid of the document format, you may consider generating the xml document on your own. That being said, you can use Automation or a third party component (a better option IMO) to access the word document, and use xsl to transform data to generate a light xml file.
|
|
|
|
|
what is the means for cookieless="false".
is it means that session data would be stored in cookies
Mahendra
|
|
|
|
|
|
We all know that Session State is bad, as it won't allow us to scale applications in web farms - but now with the .NET framework Microsoft tells us it is OK to use Session state again. This can be used by using cookieless.
In this dot net creates and store some unique name toeach cookie request.
Amit
|
|
|
|
|
Can i capture the text that is entered in iframe html control.If so how?
kamalnath
|
|
|
|
|
Try to get reference to the document object of the iframe, then you can access the whatever you want in the iframe.
IFRAME Element [^]
|
|
|
|
|
Is there any Word file to PDF file converter which will convert Word file to PDF without using Printer driver.
Please tell me if there is a converter which will give a component.
If we include that component in ASP project then it should give API to use in c# code.
|
|
|
|
|
|
Hi all,
I am trying to create the Dynamic Templates to the Repeater Control.
For that i have Desined the Template & Achieved the DataBinding to the controls in the Template, using seperate user Control (ascx file).
In my page, i have used a Repeater Control, for example, say 'myRepeater'. In the code behind file i have called the 'ItemTemplate' of the Repeater using the C# code,
myRepeater.ItemTemplate=Page.LoadTemplate(xyz.ascx);
Here, it works fine.
MY PROBLEM:
Suppose, If this template comtains 'n' set of values, everything is displyed in a single row, NOT 'n' rows of Item Templates.I need a seperator field between ItemRows also.
Here my User Control contains a table with all server controls.
How to achieve this?
Regards,
Jay
|
|
|
|
|
Hi there,
If you want to display n values as n rows (RepeaterItem), then the template user control should only show 1 value, and you can specify the seperator in the SeperatorTemplate of the Repeater control.
|
|
|
|