Click here to Skip to main content
15,885,835 members
Home / Discussions / C#
   

C#

 
QuestionNeed help creating a META file (*.meta) editor Pin
KrazyMonkey Modding25-Jan-17 18:45
KrazyMonkey Modding25-Jan-17 18:45 
SuggestionRe: Need help creating a META file (*.meta) editor Pin
Richard MacCutchan25-Jan-17 21:38
mveRichard MacCutchan25-Jan-17 21:38 
AnswerRe: Need help creating a META file (*.meta) editor Pin
NotPolitcallyCorrect26-Jan-17 1:12
NotPolitcallyCorrect26-Jan-17 1:12 
AnswerRe: Need help creating a META file (*.meta) editor Pin
Dave Kreskowiak26-Jan-17 2:46
mveDave Kreskowiak26-Jan-17 2:46 
AnswerRe: Need help creating a META file (*.meta) editor Pin
Gerry Schmitz26-Jan-17 7:29
mveGerry Schmitz26-Jan-17 7:29 
QuestionDataSet to SDF in C#? Pin
Simmerliner25-Jan-17 12:37
Simmerliner25-Jan-17 12:37 
GeneralRe: DataSet to SDF in C#? Pin
Richard MacCutchan25-Jan-17 21:37
mveRichard MacCutchan25-Jan-17 21:37 
QuestionGetting value into dropdown from db MVC Pin
eejaynic25-Jan-17 8:53
eejaynic25-Jan-17 8:53 
I'm passing the value of a month over to my View but can't seem to figure out to display it inside my declared dropdown.

HTML
<th>Posting Month:</th>
<td>
@Html.DropDownListFor(m => m.PostingMonth, new SelectList(Model.PostingMonth))

@(Html.Kendo().DropDownList()
.Name("ddlPostingMonth")
.BindTo(new List<SelectListItem>()
{
new SelectListItem() { Text = "" },
new SelectListItem() { Text = "January" },
new SelectListItem() { Text = "February" },
new SelectListItem() { Text = "March" },
new SelectListItem() { Text = "April" },
new SelectListItem() { Text = "May" },
new SelectListItem() { Text = "June" },
new SelectListItem() { Text = "July" },
new SelectListItem() { Text = "August" },
new SelectListItem() { Text = "September" },
new SelectListItem() { Text = "October" },
new SelectListItem() { Text = "November" },
new SelectListItem() { Text = "December" },
}))
</td>


This is inside my Controller:

C#
var result = CB.GetAgentDetail(orderNumber).FirstOrDefault();
model.PostingMonth = result.PostingMonth;
//model.Unpack = result.

ViewBag.PostingMonth = result.PostingMonth;
ViewBag.Overflow = result.Overflow;
//model.Book_Agent = result.Book_Agent;
model.Tare1 = result.Tare1;
//model.Tare2 = result.


return View(model);
^^^^^^^ The value from the database actually shows when I step through using a breakpoint.

How do I get this value to appear in my dropdown control?

When I try something simple like: @Html.DisplayTextFor(m => m.PostingMonth), it shows the correct value in a textbox.

Please help!!
Questionweb control browser Pin
jigishaben25-Jan-17 2:37
jigishaben25-Jan-17 2:37 
AnswerRe: web control browser Pin
OriginalGriff25-Jan-17 2:56
mveOriginalGriff25-Jan-17 2:56 
QuestionMessage Closed Pin
25-Jan-17 1:18
professionalJackson Savitraz25-Jan-17 1:18 
AnswerRe: Fuzzy IndexOf using Bitap Algorithm Pin
OriginalGriff25-Jan-17 1:52
mveOriginalGriff25-Jan-17 1:52 
QuestionAppending data to existing excel file using C# Pin
Member 1296649424-Jan-17 15:34
Member 1296649424-Jan-17 15:34 
AnswerRe: Appending data to existing excel file using C# Pin
Ralf Meier24-Jan-17 22:18
mveRalf Meier24-Jan-17 22:18 
AnswerRe: Appending data to existing excel file using C# Pin
Richard MacCutchan24-Jan-17 22:34
mveRichard MacCutchan24-Jan-17 22:34 
AnswerRe: Appending data to existing excel file using C# Pin
Patrice T25-Jan-17 10:55
mvePatrice T25-Jan-17 10:55 
QuestionAwait - Async not so simple to use? Pin
Richard Andrew x6424-Jan-17 12:24
professionalRichard Andrew x6424-Jan-17 12:24 
AnswerRe: Await - Async not so simple to use? Pin
Nathan Minier24-Jan-17 14:22
professionalNathan Minier24-Jan-17 14:22 
GeneralRe: Await - Async not so simple to use? Pin
Richard Andrew x6425-Jan-17 1:41
professionalRichard Andrew x6425-Jan-17 1:41 
AnswerRe: Await - Async not so simple to use? Pin
Jon McKee24-Jan-17 17:53
professionalJon McKee24-Jan-17 17:53 
GeneralRe: Await - Async not so simple to use? Pin
Richard Andrew x6425-Jan-17 1:42
professionalRichard Andrew x6425-Jan-17 1:42 
SuggestionRe: Await - Async not so simple to use? Pin
Richard Deeming25-Jan-17 3:09
mveRichard Deeming25-Jan-17 3:09 
GeneralRe: Await - Async not so simple to use? Pin
Jon McKee25-Jan-17 9:34
professionalJon McKee25-Jan-17 9:34 
GeneralRe: Await - Async not so simple to use? Pin
Richard Deeming25-Jan-17 10:23
mveRichard Deeming25-Jan-17 10:23 
GeneralRe: Await - Async not so simple to use? Pin
Jon McKee25-Jan-17 10:49
professionalJon McKee25-Jan-17 10:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.