|
I have been using object data source in asp.net 2.0 for a couple of months now and this way of binding data for simple applications is reaaly cool but as things get a little comlicated like
1.Binding a form view to a Grid view's selection with composit primary keys 2.Binding to a checked list box where checked status is data driven
people start pointing that it is similar to .net 1.1.
Could some one pls point me to How to use the Object data source for binding data in the above scenarios.
Thanks & Regards
Rahul
|
|
|
|
|
How to insert a check box into a treeview
priyanka
|
|
|
|
|
<asp:treeview id="TreeView1" runat="server" datasourceid="XmlDataSource1" showcheckboxes="all">
-------ShowCheckBoxes="all"------
Priyanka
|
|
|
|
|
I have 2 aspx pages, here called A and B. page A have many record and have an APPLY button. When user select one record from page A and click the APPLY button, page B will prompt up and display the information about the selected record. My situation is , sometime when user select the different record and click APPLY button, page B will prompt up and show previous record rather then the current selected record, while i refresh the page B then only will show the current record, how to solve this problem ? my friend said is because the browser lock the cahce, but how to disable it ?
Best regards,
Chee ken
|
|
|
|
|
hi if u want to remove current page cache thn try for the following code.
<br />
<br />
Response.Buffer = true;<br />
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);<br />
Response.Expires = -1500;<br />
Response.CacheControl = "no-cache";<br />
<br />
<br />
<br />
<br />
u can also use the server.execute(b.aspx)
try for both. hope tht'll solve ur problem
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
I try already, still cannot, is it this code is for restrict user click the back button for the browser?
Best regards,
Chee ken
|
|
|
|
|
It is difficult to say, but I don't think it is a cache problem. How do you pass values from one page to another? Can you paste a code here (redirection and value storing/passing from page A and value reading from page B)?
Pilo
|
|
|
|
|
Hello,
Could someone tell me how to convert a XML file into another XML file using a XSL file with a parameter? I created the code to do it, and it seems ok, but it is not working.
Could somebody, please, help me out? I am on this for days.
My code is as follows:
Dim webSiteMap As XmlDocument = New XmlDocument
webSiteMap.Load(HttpContext.Current.Server.MapPath("~/INPUT.XML"))
Dim googleXsl As XslCompiledTransform = New XslCompiledTransform
googleXsl.Load(HttpContext.Current.Server.MapPath("~/CONVERT.XSL"))
Dim googleXslArguments As XsltArgumentList = New XsltArgumentList
googleXslArguments.AddParam("Domain", "", "http://www.domain.com")
Dim webSiteMapStream As MemoryStream = New MemoryStream
googleXsl.Transform(webSiteMap, googleXslArguments, webSiteMapStream)
context.Response.Clear()
context.Response.ContentType = "text/xml; charset=utf-8"
context.Response.Write(Encoding.UTF8.GetString(webSiteMapStream.GetBuffer))
context.Response.End()
Thanks,
Miguel
|
|
|
|
|
shapper wrote: but it is not working.
You'll have to provide more detail than this. Is an exception being thrown? Is the transform not happening? Is it happening but you don't get the expected results?
only two letters away from being an asset
|
|
|
|
|
Han,
C# for me is fine. I will do any conversion to VB.Net.
Anyway, I tried your suggestion and it still doesn't work.
Anyway, I am posting my XSL and XML files as well the new version of my VB.NET (I also post the conversion to C# using the VB.NET to C# converter available in http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx)
The error I am getting is:
XML Parsing Error: not well-formed
Location: http://localhost:1132/GaragemRamos%202006a/Google
Line Number 2, Column 62:<urlset xmlns="http://www.google.com/schemas/sitemap/0.84" />
Thanks,
Miguel
--------- XSL CODE ---------
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:dk="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="WebSiteUrl"/>
<xsl:template match="dk:*"/>
<xsl:template match="@*|text()|comment()"/>
<xsl:template match="/">
<xsl:element name="urlset">
<xsl:apply-templates select="//dk:siteMapNode[@google='true']"/>
</xsl:element>
</xsl:template>
<xsl:template match="dk:siteMapNode">
<xsl:element name="url">
<xsl:element name="loc">
<xsl:value-of select="$WebSiteUrl" />
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>
<xsl:element name="lastmod">
<xsl:value-of select="@lastmod"/>
</xsl:element>
<xsl:element name="changefreq">
<xsl:value-of select="@changefreq"/>
</xsl:element>
<xsl:element name="priority">
<xsl:value-of select="@priority"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
--------- VB.NET Code ---------
' Create ASP.NET web site map
Dim webSiteMap As XmlDocument = New XmlDocument
' Load ASP.NET's site map
webSiteMap.Load(HttpContext.Current.Server.MapPath("~/Web.sitemap"))
' Create google xsl document
Dim googleXsl As XslCompiledTransform = New XslCompiledTransform
' Load google xml document
googleXsl.Load(HttpContext.Current.Server.MapPath("~/SiteMap.xsl"))
' Create xsl arguments list
Dim googleXslArguments As XsltArgumentList = New XsltArgumentList
googleXslArguments.AddParam("WebSiteUrl", "", "http://www.mydomain.com")
' Create the ASP.NET's site map memory stream
Dim googleSiteMapStream As MemoryStream = New MemoryStream
' Transform Asp.Net's site map to Google's site map and add it to stream
googleXsl.Transform(CType(webSiteMap, XPath.IXPathNavigable), googleXslArguments, googleSiteMapStream)
' Flush google site map stream
googleSiteMapStream.Flush()
' Set google site map stream position to 0
googleSiteMapStream.Position = 0
' Output Google sitemap
context.Response.Clear()
context.Response.ContentType = "text/xml; charset=utf-8"
context.Response.Write(Encoding.UTF8.GetString(googleSiteMapStream.GetBuffer))
context.Response.End()
--------- C# CODE ---------
XmlDocument webSiteMap = new XmlDocument();
webSiteMap.Load(HttpContext.Current.Server.MapPath("~/Web.sitemap"));
XslCompiledTransform googleXsl = new XslCompiledTransform();
XsltArgumentList googleXslArguments = new XsltArgumentList();
googleXslArguments.AddParam("WebSiteUrl", "", "http://www.mydomain.com");
MemoryStream googleSiteMapStream = new MemoryStream();
googleXsl.Transform(((XPath.IXPathNavigable)(webSiteMap)), googleXslArguments, googleSiteMapStream);
googleSiteMapStream.Flush();
googleSiteMapStream.Position = 0;
context.Response.Clear();
context.Response.ContentType = "text/xml; charset=utf-8";
context.Response.Write(Encoding.UTF8.GetString(googleSiteMapStream.GetBuffer));
context.Response.End();
--------- XML File (Web.sitemap) ---------
<?xml version="1.0" encoding="utf-8" ?>
<siteMap
xmlns="http://schemas.microsoft.com/ASPNet/SiteMap-File-1.0" >
<siteMapNode>
<siteMapNode
url="~/Default.aspx"
title="Home"
description="Desc1"
changefreq="daily"
lastmod="2006-11-01T20:25:42+01:00"
priority="1"
google="true" />
<siteMapNode
url="~/Company.aspx"
title="Company"
description="Desc2"
changefreq="daily"
lastmod="2006-11-01T20:25:42+01:00"
priority="0.2"
google="true" />
<siteMapNode
url="~/Contacts.aspx"
title="Contacts"
description="Contacts"
changefreq="daily"
lastmod="2006-11-01T20:25:42+01:00"
priority="0.4"
google="false" />
</siteMapNode>
</siteMap>
Well, that is all I think. I hope someone can help me out.
Thank You Very Much,
Miguel
|
|
|
|
|
Please,
Could someone help me out?
I just posted my entire code. I still wasn't able to solve my problem
Thank You Very Much,
Miguel
|
|
|
|
|
Hi,
I've created the following menu:
<asp:Menu id="Menu1" runat="server" Orientation="vertical" OnMenuItemClick="Menu1_MenuItemClick" DisappearAfter="0" StaticEnableDefaultPopOutImage="False" BorderWidth="0px" BorderStyle="None">
<DynamicHoverStyle BackColor="#6B96B5" />
<Items>
<asp:MenuItem Text="· HOME" NavigateUrl="~/index.aspx" Value="· HOME" />
<asp:MenuItem Text="· REFERENCE CENTER" Value="· REFERENCE CENTER">
<asp:MenuItem Text="· CUSTOMER TOOLS" Value="· CUSTOMER TOOLS" /> </Items>
<LevelMenuItemStyles>
<asp:MenuItemStyle BackColor="#084C82"
ItemSpacing="0px"
HorizontalPadding="6px"
VerticalPadding="4px"
BorderColor="Black"
BorderWidth="0px"
Font-Size="11px"
Font-Bold="True"
Font-Italic="False"
Font-Names="Verdana"
ForeColor="White" Font-Underline="False" />
<asp:MenuItemStyle BackColor="#084C82"
ItemSpacing="0px"
HorizontalPadding="6px"
VerticalPadding="4px"
BorderColor="Black"
BorderWidth="1px"
Font-Size="11px"
Font-Bold="True"
Font-Italic="False"
Font-Names="Verdana"
ForeColor="White" Font-Underline="False" />
</LevelMenuItemStyles>
<DynamicItemTemplate>
<%# Eval("Text") %>
</DynamicItemTemplate>
<StaticHoverStyle BackColor="#6B96B5" />
</asp:Menu>
But there's still ItemSpacing between the menu items. When I set the ItemSpacing to 10 in the MenuItemStyle above, it goes to 10 pixels, but it doesn't drop all the way down to 0 when I set it to that.
If I change the orientation to horizontal, it works correctly.
Any ideas?
Thanks.
|
|
|
|
|
Hai Friends
In my application, i have to Import the data from excel sheet to mysql and vice versa
i have one menu ,in that ,i will have too options
one is : Export
In this When i click on the Export Button, the data to be stored in Excel sheet(mysql to Excel)
Second one is : Import
when i click on it , it will show one browse button, by selecting particular excel sheet,
when i click on import in this page, that data in that excel sheet to be stored in database
please help me how to do it in asp.net
Kishore Kumar
|
|
|
|
|
|
I want to build a page like pp2g (www.pp2g.com) for school assigment.
can someone please help me? what do I need and whst is the best way to build such a site?
I have Visual Stodio .net 2003.
tinx Saeed
Saeed
|
|
|
|
|
Saeed,
It's better for you to download and install the Visual Web Developer (VWD) from Microsoft's website (it's free) as your development environment. To learn how to build a basic site, visit http://www.learnvisualstudio.net/Free.aspx[^]
Just make sure you have .Net 2.0 Framework and IIS 6.0 installed on your development machine BEFORE installing VWD. This should be enough for now!
Nila
|
|
|
|
|
I know how to build a basic site, but the problem is that i want to build a site with the follwing contents:
a page that users can edit thier profile
and that they can upload photo's
and able to chat
i have build the pages, but I dont know how to let them work properly: for examp: if they edit thier page in de edit mode, that de settings appaers on thier page.
and they should be ebale to edit thier page in HTML.
can u help me?
Saeed
|
|
|
|
|
When is your assignment due? I am in the middle of work right now but I can help you over the weekend. Let me know.
Nila
|
|
|
|
|
I have 3 weeks left. you can also add me on msn if you want to.
smgetaweh@hotmail.com , but I'm always on: thughgang@hotmail.com.
thanks.
Saeed
|
|
|
|
|
Sorry about the delays... didn't get notification email for your posting until today!
Web App Development 101 in a nutshell{
1) You have to figure out how you are going to store data.
2) Chances are, you will have to use a database of somekind... draw your tables, set your relations/PK/FK/etc.
3) Decide on how many pages you will have, and what will each do, and how they will interact with oneanother and the server.
4) ALWAYS start your design from the top, then start developing from the buttom. With that being said, start sketching your process flow charts and define data flow.
5) Start coding!
}
Now, how many pages will you have? Will you need to use a masterpage to display certain things at all times (e.g. login)? Are you going to use a theme? Take a look at this when you get a chance:
http://www.asp.net/downloads/starterkits/default.aspx?tabid=62
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
No need to say sorry
I have put few things on paper and I would like to send then to you. could I have your mail?
because I can't cant it through this MessageBOX.
my mail is smgetaweh@hotmail.com
saeed
Saeed
|
|
|
|
|
Cool, zip'em and send to NightHawk13@hotmail.com
Did you, by and chance, find a template that would work for you?
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
I have not yet find a Template..
Im not that good at designen..
saeed
Saeed
|
|
|
|
|
Out of curiosity, which school do you attend?
Nila
"...for that, I will need a large cup of coffee and a brand muffin!" -Samantha Bea
|
|
|
|
|
Hi guys, i have an edit LinkButton which display a update panel with some lables and textfields in it. I want to display some values in the textFields before the updatePanel comes on the screen. I am basically, creating an updatepage which should first display the exisiting values.
When i click on editQuestionLnkBtn it calls below ajax and this code display a panel.
All i want is before editQuestionLnkbtn calls this ajax i want to initialize some values of this panel and then display the page
<atlas:modalpopupproperties id="mp10" targetcontrolid="editQuestionLnkBtn" popupcontrolid="panelUpdateMcQ" cancelcontrolid="btnCancelUpdateMcQ" backgroundcssclass="modalBackground" dropshadow="True">
|
|
|
|