15,898,134 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 Tipton Tyler (Top 10 by date)
Tipton Tyler
3-Oct-16 17:51pm
View
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a NavigateUrl tag to the "BulletedList"
1) NavigateUrl='%# "ViewDetails?SongId=" + Songs.Id.ToString()%'
// Songs does not exist in current context.
mySong.Id.ToString() //mySong does not exist in current context.
Song.Id // An object reeference is required for the non-statid field, method or property 'Song.Id.Get'
Song.Id // An object reeference is required for the non-statid field, method or property 'Song.Id.Get'
Value% // The name Value does not exist in current context. (I thought this might get the value from the "BulletedList" "DataValueField" but obviously it didn't)
I had little luck using a second
NavigateUrl='%# "ViewDetails?SongId=" + Eval("Id")%' // System.Web.HttpException: DataBinding: does not contain a property with the name 'Id'.
Eval("mySong.Id")%' // System.Web.HttpException: DataBinding: does not contain a property with the name 'mySong'.
Eval("Song.Id")%> // System.Web.HttpException: DataBinding: does not contain a property with the name 'Song'.
I'm beginning to believe I need a whole new approach but I don't really know where to start. It can't really be that hard to programatically stick a value into a "NavigateUrl".
[NB: I had to remove all the tags because the text editor seems to interpret them as end markers.]
Tipton Tyler
3-Oct-16 17:44pm
View
Deleted
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a NavigateUrl tag to the "BulletedList"
Tipton Tyler
3-Oct-16 17:43pm
View
Deleted
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a
Tipton Tyler
3-Oct-16 17:42pm
View
Deleted
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a
Tipton Tyler
3-Oct-16 17:40pm
View
Deleted
Eval("Song.Id")%> // System.Web.HttpException: DataBinding: does not contain a property with the name 'Song'.
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a
Tipton Tyler
3-Oct-16 17:37pm
View
Deleted
I'm not quite sure where I need to add "Item". However, here are some things I tried after adding a
Tipton Tyler
3-Oct-16 8:37am
View
Thank you for your quick response. I don't believe the problem is in the binding. I can create a bulleted list that lists song titles using:
DataSource = '<%# Eval("Songs") %>' DataTextField="Title"
and a bulleted list that lists the appropriate song id using:
DataSource = '<%# Eval("Songs") %>' DataValueField="Id"
NB[somehow part of the code for the "SongsAndBands" forms got deleted from the question and looks like this:
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<asp:EntityDataSource ID="EntityDataSource1" runat="server">
<asp:Repeater ID="Repeater1" runat="server" >
I believe my problem is structure; I don't know how to capture the the song id and insert it in a hyperlink within the bulleted list.
Tipton Tyler
29-Dec-15 16:34pm
View
Well, using Visual Studio and IIS, I can render the project on LocalHost on my computer. I would like to be able to render it on my Web Host, ATT WebHost, server and access it over the net. This has not been as easy as rendering it on my browser using LocalHost and was asking if anyone has had any similar experience in getting an ASP.NET project to render on a web hosting site.
Tipton Tyler
6-Aug-15 12:06pm
View
Thank you all for your suggestions. I apologize for the incomplete XAML code. In an attempt to mineralize, I left a few things in that weren't pertinent and left out a few that were. As suggested I ran the "code behind" in the manner suggested by arussell and everything worked as expected. I then did what I probably should have before submitting the question and began adding the remainder of the code for the full application piece by piece. It only took one try to isolate the problem.
The full application loads the brokers, categories and subcategories from a database. I use a datareader to load the comboboxes. The pertinent code follows:
sql = "SELECT Broker FROM tabBroker ORDER BY Broker";
cboBroker = cboFiller.FillBox(sql, cboBroker);
public ComboBox FillBox(string sql, ComboBox cboBox)
{
string Sql = sql;
string strConnect = "Data Source=(LocalDB)\\MSSQLLocalDB;Initial
Catalog=database;Integrated Security=True";
SqlConnection con = null;
SqlDataReader reader = null;
try
{
con = new SqlConnection(strConnect);
con.Open();
SqlCommand com = new SqlCommand(Sql, con);
reader = com.ExecuteReader();
while (reader.Read())
{ cboBox.Items.Add(reader.GetString(0)); }
}
catch (SqlException Ex)
{ MessageBox.Show("Failure to load " + cboBox + "\n + " + Ex); }
finally
{ if (reader != null) { reader.Close(); } con.Close(); }
return cboBox;
}
The weird WPF behavior occurs when the comboboxes are loaded in this manner. I suspect SAKryukov suggestion is pertinent but I'm not sure how to go about implementing the solution.
Tipton Tyler
11-Jan-15 12:24pm
View
Thank all of you for your suggestions, they did help. Yes, I found the connection protocols in the SQL Network Configuration tab of the SQL Server Configuration Manager and enabled "Named Pipes" (it had been disabled). Some how I was able to get the SQL Server Browser running (perhaps setting the Advanced Properties Start Mode to "Automatic" allowed me access. I don't know if anyof this really helped. In the end I found out that the Server Name was simply the name of my computer, "LENOVO_Laptop": not SQLEXPRESS, not SQLEXPRESS, not MSSQLSERVER, not Local, or Localhost or LocalDB but just the name of my computer, Go figure. Again, thanks for your help. I think I'm back in business :-)
Show More