|
Not enough information.
hdv212 wrote: but when i edit my record in formView and click on Update link, nothing occured.
As in, FormView stayed in edit mode? Or database wasn't updated? Was updating event fired for FormView? And for SqlDataSource?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
yes! it is Stayed in edit Mode (i set EditMode as Default mode) and when i click Update linkButton, nothing occured(like that you don't clicked)
|
|
|
|
|
Not even postback? Do you have any validators there?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Yes it is. Not even postback. how to validate it ?
|
|
|
|
|
hdv212 wrote: Not even postback.
That's the better alternative I think Check if you see any javascript errors on the page, browser plugins like firebug (for Firefox) will let you debug the javascript.
hdv212 wrote: how to validate it ?
I mean, aren't there any ASP.NET validators that prevent page from postback?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
dnh wrote: I mean, aren't there any ASP.NET validators that prevent page from postback?
Yes, they all do, if run on the client side.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
there = in his code.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hey all.
Im struggling to understand and get this to work.
Can anyone tell me step by step how to use an RSS feed to display news headlines in my Website. I have no clue how this works....? Do i create the RSS feed? Do I download it? How do i use it?
Please help
Dazz
|
|
|
|
|
There are lots of articles and tutorials out there on how to consume RSS feeds - even some here on CP. Search the articles and Google for "RSS consume web page"... no-one's going to write a whole tutorial just for you here...
Do some basic research, then, if you have a specific question...
|
|
|
|
|
The reason why i worded my query the way i did is because I have already done 6 tutorials off the web and none of them worked. So i posted a comment in order to hopefully find someone who has used them before.I dont want anyone to write a tutorial for me... But thanks anyway for your brilliant suggestion.
Dazz
|
|
|
|
|
Well, honestly, I have never done this (consuming RSS feeds) before, but it took me all of 10 minutes to follow this example
http://aspnet.4guysfromrolla.com/articles/031903-1.aspx
and get it working. All I would say is, that you have to a) find out the URL of the RSS feed you want to xonsume - and most websites that have one will display it, or else search for it on Google; and b) you will probably have to examine the XML returned to ge the appropriate field names. You should also probably server.htmlencode the description field at least.
Here is my code for my working example: (Click thr button)
I'm afraid I'm out for thr day now, so you're on your own after this....
Fred
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
End Sub
Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs)
recentPosts.DataSource = GetRSSFeed("http://www.weathercommerce.net/rss4.xml")
recentPosts.DataBind()
End Sub
Function GetRSSFeed(strURL as String) as DataTable
'Get the XML data
Dim reader as XmlTextReader = New XmlTextReader(strURL)
'return a new DataSet
Dim ds as DataSet = New DataSet()
ds.ReadXml(reader)
Return ds.Tables("item")
End Function
</script>
<HTML>
<HEAD>
<title></title>
</HEAD>
<body >
<form id="Form1" runat="server">
<asp:DataGrid runat="server" id="recentPosts" AutoGenerateColumns="False"
Font-Names="Arial" Font-Size="10pt"
HeaderStyle-Font-Bold="True"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt"
AlternatingItemStyle-BackColor="#eeeeee">
<Columns>
<asp:TemplateColumn HeaderText="Most Recent Posts">
<ItemTemplate>
<a href="<%# DataBinder.Eval(Container.DataItem, "link")%>">
<%# DataBinder.Eval(Container.DataItem, "title") %>
</a><br /><i><%#DataBinder.Eval(Container.DataItem, "description")%></i>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<asp:Button ID="btnX" runat="server" Text="Smack" OnCLick="btn_Click" />
</form>
</body>
</HTML>
|
|
|
|
|
Hi,
I want EnableViewState = false in order to optimize the end output page but when i turn it off, my pageing functionality no longer works mainly the PageIndexChanged event no longer fires, how do you handle this with enable view state as false?
I have tried every thing possible to make it work but it is not working. I refered few forums in which people were facing similar problems but no one was able to provide some concrete solution for the same. Please refer the below links where people have faced similar problems but the solution provided is not reliable:
http://www.west-wind.com/WebLog/posts/211.aspx
http://www.velocityreviews.com/forums/t67338-pageindexchanged-not-firing-in-datagrid.html
I've tried explicit event hookup but still it did'nt work.
I know if we call the data generation method before the page change method it will work but in this case the data generation mehtod will be called twice first before the page change method and second in the page change method, this will result in huge performance degradation and i want to avoid it.
Let me know if it is a genuine bug in ASP .NET or there is some way out to this problem. An early reply will be really helpfull.
thanks!
|
|
|
|
|
Well of course it won't work if EnableViewState = False - how can it?
if you want to minimise the size of viewstate on a page where it is needed, then you must disable it (set to false) at the individual control level, not page level (obviously only for those controls that don't need to post back their state...)
Fred
|
|
|
|
|
Thanks for your reply, but it is practically not possible for me to keep enableviewstate true since there are huge reports. Hence for my case i have to keep it false. Is there any other way out and is it a bug in ASP.NET
Thanks!
|
|
|
|
|
No, it'a not a bug - it's by reading the viewstate that asp.net can perform the paging; if you turn it off, it has no way of knowing what page you are on.
If you really want to turn it off (though if you are displaying that much "huge" information on the page I'd suggest you look again at this: perhaps links to the individual reports would be better?) you will have to "fake" your own paging instead of relying on the datagrid's inbuilt functionality.
Only read and display the first 10 (?) records; find out how many there actually are and dynamically write links to each set of 10... each link will cause the page to reload pulling only the required records (bit more coding there for you to work out!), and you will also have to re-calculate and re-write your page links again each time....
|
|
|
|
|
Thanks Fred. I will work on it.
Regards,
Anees
|
|
|
|
|
What version of ASP.NET are you using?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
I am using ASP.NET 2.0
Regards,
Anees
|
|
|
|
|
Then it really may be a bug (bad design), such a thing could be in ControlState. Why are you using DataGrid anyway, when there is GridView?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Please try disabling the viewstate for innercontrols rather than for DataGrid as a whole.
|
|
|
|
|
hi guys
i have used a window.showModalDialog, the window is opening, but when i close the ModalDialog the parent page is getting refreshed .
any suggestion how to stop the parent page getting refreshed
regards
winnie
|
|
|
|
|
codelinks wrote: any suggestion how to stop the parent page getting refreshed
You can use "window.open " instead of window.showModalDialog . if you have to use window.showModalDialog then the answer is no.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi,
I just want to know how to extend/modify the session timing for an particular page in asp 2.0.
Thanks
Jith
|
|
|
|
|
The session.timeout limit is an application-wide setting, as far as I am aware you can't set it on a page-by-page level basis.
However, if you want to make sure the session doesn't excpire while on a particular page, you can use a workaround/trick of loading a Javascript function on page load that includes a SetInterval call to keep requesting a dummy page every few seconds before teh session is due to expire:
function Reconnect(){
var img = new Image(1,1);
img.src = 'reconnect.aspx';
}
window.setInterval('Reconnect()',1170000);
reconnect.aspx is just a blank aspx page; the interval 1170000 ms is 30 seconds short of the default session timeout time of 20 minutes.
Fred
|
|
|
|
|
Hi Fred,
Thanks for your solution.
Thanks
Jith
|
|
|
|