|
Your core problem is that the web.config is setup for remote clients to not see debug errors, which is good, but unless you can test it directly on the server, you need to change it, to find out what the actual error is.
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 )
|
|
|
|
|
can we have more than one sitemap ina project?
if yes how?
how can we display just a part of a site map by a menu?
|
|
|
|
|
I have a dropdownlist control that I want to populate via a function in the code behind. I'm using a a table adapter to actuyally retrieve the fdata, (and when I "previewData", the expected data is displayed. This is what I have so far:
(userType is the dropdownlist control on the aspx page)
STAFFTYPESTableAdapter adapter = new STAFFTYPESTableAdapter();
userType.DataSource = adapter.GetStaffTypes();
All of the items in the dropdown read as follows:
System.Data.DataRowView
There are exactly n occurrences, where n is the number of records in the table. In other words, there are 7 records I expect to see, and there are 7 entries in the dropdown list.
The table I'm retrieving contains two fields - a numeric ID and a text description. What am I doing wrong?
Before you suggest letting the form handle it, I don't want to do it that way.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
All items are showing like that in dropdown???
John Simmons / outlaw programmer wrote: System.Data.DataRowView
It is because you didn't specify the DataValueField and DataTextField.
<br />
DropDownList1.DataSource = ds.Table[0];<br />
DropDownList1.DataValueField = "id";<br />
DropDownList1.DataTextField = "description";<br />
DropDownList1.DataBind();
Hope it helps.
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.
|
|
|
|
|
Ahhhh. Many thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: The table I'm retrieving contains two fields - a numeric ID and a text description. What am I doing wrong?
It's exactly what Michael said. You didn't specify which field to show, so what can the dropdown do? Call .ToString(), and that's exactly what's happening.
[ 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: It's exactly what Michael said.
So why respond?
only two letters away from being an asset
|
|
|
|
|
If you cared to read past first sentence you would see I explained WHAT and WHY is John seeing.
[ 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
|
|
|
|
|
Still an unnecessary response. Thanks for the 1, give me another so I can have 2.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: unnecessary response.
Ok if you say so, I'll resist my urge to explain something next time. By the way, I am catching up on you in unnecessary responses... now we both have two in this thread :P
Mark Nischalke wrote: Thanks for the 1, give me another so I can have 2
You didn't ask stupid (from my POV) question this time, but expressed you opinion. Why should I?
[ 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
|
|
|
|
|
How to set CSS class to tbody of GridView? When I set the css class in Row-Style property, all rows have been set with this style which is I don't want. I found the way to set CSS class in thead and tfooter of GridView. but not for tbody. Is it possible to do with CSS adapter or normal way?
For example
If I wrote the code like that,
HTML View
<asp:GridView ID="GridView1" runat="server" > <br />
</asp:GridView><br />
Code-behinded File
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
List<string> list = new List<string>();<br />
list.Add("Alien");<br />
<br />
GridView1.DataSource = list;<br />
GridView1.DataBind(); <br />
<br />
}<br />
the HTML tag will be generated as fellows by default ~
<table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;"><br />
<tr><br />
<td>Alien</td><br />
</tr><br />
</table><br />
I noticed that there is no thead or tbody or tfoot in the generated HTML table. I want GridView to generate the HTML table with those tags. So, I tried with the follwing code.
<br />
grid.UseAccessibleHeader = true;<br />
<br />
grid.HeaderRow.TableSection = TableRowSection.TableHeader;<br />
grid.HeaderRow.CssClass = "fixedHeader";<br />
<br />
grid.FooterRow.TableSection = TableRowSection.TableFooter;<br />
<br />
then, I can add thead, tbody and tfoot to generated HTML successfully. It allows me to set the custom CSS class by using HeaderRow.CssClass and FooterRow.CssClass properties. But I found no way to specify the custom CSS class for tbody. So, it would be great if anyone tell me to achieve this goal.
Thanks in advance.
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.
|
|
|
|
|
Yeah. It can be done with ASP.NET 2.0 CSS Friendly Control Adapters 1.0
Check-out here if you want the sample for that.
Hope it helps for everybody..
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.
|
|
|
|
|
After I installed my web application on the server,please I had an error when I wanted to generate a report that I designed with visual studio 2003 crystal report.
The error is "Keycode.dll missing or keycode is invalid" this report is from crystaldecision engine. But if I generate the report on the pc I used to develop the web application it will display. Please how can I solve this.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
hi
in my webForm i have a gridView and FormView and bind both objects to SqlDataSource1(GridView for select,delete and FormView for Update), in my webForm
when user select a row in GridView, it show all details fields in FormView for editing, but when i edit my record in formView and click on Update link, nothing occured.
how to solve my problem ?
note 1 : when i click on Delete link in GridView, current record delete from gridView successfully.
note 2 : my delete and update commands is StoredProcedure and set it in my SqlDataSource1.
|
|
|
|
|
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>
|
|
|
|