Click here to Skip to main content
15,888,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Solving accounting problem in FIFo by using a queue. Pin
ZurdoDev4-Sep-15 2:01
professionalZurdoDev4-Sep-15 2:01 
QuestionMultiSelect dropdown issue Pin
Mustanggx31-Aug-15 7:32
Mustanggx31-Aug-15 7:32 
Questiontrouble deploying a modified project; no *.dll output after build Pin
Member 438734329-Aug-15 10:43
Member 438734329-Aug-15 10:43 
AnswerRe: trouble deploying a modified project; no *.dll output after build Pin
jkirkerx30-Aug-15 8:37
professionaljkirkerx30-Aug-15 8:37 
AnswerRe: trouble deploying a modified project; no *.dll output after build Pin
Afzaal Ahmad Zeeshan30-Aug-15 11:20
professionalAfzaal Ahmad Zeeshan30-Aug-15 11:20 
AnswerRe: trouble deploying a modified project; no *.dll output after build Pin
Blikkies30-Aug-15 21:08
professionalBlikkies30-Aug-15 21:08 
GeneralRe: trouble deploying a modified project; no *.dll output after build Pin
Member 438734331-Aug-15 5:58
Member 438734331-Aug-15 5:58 
QuestionLoad data from Database into Razor View using Checkbox Checked event Pin
Enobong Adahada29-Aug-15 3:50
Enobong Adahada29-Aug-15 3:50 
Hello,
I have a TextArea, A submit button and a check box on a Razor view, i want to load some records from the database in to the textarea and then use the submit to send Mesages to the recods loaded.
The issue is that i dont know how to load the data using the check box.
This is my code so far:

the controller:
public ActionResult Message(bool loadData)
{
List<sendmessageviewmodel> _mobile = new List<sendmessageviewmodel>();
if (loadData)
{

foreach (var item in db.ParentsModels)
{
_mobile.Add(new SendMessageViewModel { destination = item.mobile+"," });
}
}
return View(_mobile);
}

The View code is:
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()




@Html.ValidationSummary(true, "", new { @class = "text-danger" })

@Html.LabelFor(model => model.sender, htmlAttributes: new { @class = "control-label col-md-2" })

@Html.EditorFor(model => model.sender, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.sender, "", new { @class = "text-danger" })




@Html.LabelFor(model => model.title, htmlAttributes: new { @class = "control-label col-md-2" })

@Html.EditorFor(model => model.title, new { htmlAttributes = new { @class = "form-control"} })
@Html.ValidationMessageFor(model => model.title, "", new { @class = "text-danger" })




@Html.LabelFor(model => model.message, htmlAttributes: new { @class = "control-label col-md-2" })

@Html.TextAreaFor(model => model.message, new { htmlAttributes = new { @class = "form-control", style = "overflow-y:scroll;vertical-align:top;margin:4px 1px 4px 0;height:293px;width:800px" } })
@Html.ValidationMessageFor(model => model.message, "", new { @class = "text-danger" })





@Html.CheckBoxFor(model => model.loadData)
@Html.LabelFor(model => model.loadData)




@Html.LabelFor(model => model.destination, htmlAttributes: new { @class = "control-label col-md-2" })

@Html.TextAreaFor(model => model.destination, new { htmlAttributes = new { @class = "form-control", style = "overflow-y:scroll;vertical-align:top;margin:4px 1px 4px 0;height:293px;width:800px" } })
@Html.ValidationMessageFor(model => model.destination, "", new { @class = "text-danger" })





<input type="submit" value="Send" class="btn btn-default" />




}
Thanks
AnswerRe: Load data from Database into Razor View using Checkbox Checked event Pin
jkirkerx29-Aug-15 9:11
professionaljkirkerx29-Aug-15 9:11 
QuestionHow can write Algorithm for the following question? Pin
BUNER28-Aug-15 7:56
BUNER28-Aug-15 7:56 
AnswerRe: How can write Algorithm for the following question? Pin
Richard Deeming28-Aug-15 8:16
mveRichard Deeming28-Aug-15 8:16 
GeneralRe: How can write Algorithm for the following question? Pin
BUNER28-Aug-15 8:25
BUNER28-Aug-15 8:25 
QuestionCapturing Selected Items in a DataList Control Pin
Member 1005957127-Aug-15 0:40
Member 1005957127-Aug-15 0:40 
AnswerRe: Capturing Selected Items in a DataList Control Pin
jkirkerx28-Aug-15 9:36
professionaljkirkerx28-Aug-15 9:36 
Questionhigh concurrency,principalContext.ValidateCredentials,slow Pin
Member 1193909726-Aug-15 22:05
Member 1193909726-Aug-15 22:05 
Questionpartial view and model binding Pin
rajeshmoorthy24-Aug-15 18:51
rajeshmoorthy24-Aug-15 18:51 
QuestionPDF.JS using ASP.NET MVC Pin
Kandepu Rajesh24-Aug-15 11:54
Kandepu Rajesh24-Aug-15 11:54 
AnswerRe: PDF.JS using ASP.NET MVC Pin
Richard Deeming25-Aug-15 2:27
mveRichard Deeming25-Aug-15 2:27 
GeneralRe: PDF.JS using ASP.NET MVC Pin
Kandepu Rajesh25-Aug-15 10:21
Kandepu Rajesh25-Aug-15 10:21 
GeneralRe: PDF.JS using ASP.NET MVC Pin
Richard Deeming26-Aug-15 1:57
mveRichard Deeming26-Aug-15 1:57 
AnswerRe: PDF.JS using ASP.NET MVC Pin
sigma_ivan25-Aug-15 19:02
sigma_ivan25-Aug-15 19:02 
Questionmultiple database connection. how to rollback Pin
Karan_TN24-Aug-15 1:23
Karan_TN24-Aug-15 1:23 
AnswerRe: multiple database connection. how to rollback Pin
F-ES Sitecore24-Aug-15 2:10
professionalF-ES Sitecore24-Aug-15 2:10 
Questionitem template of data list use anchor href that change by dynamicallyon user click after that fetch data by href Pin
Member 1005957118-Aug-15 16:31
Member 1005957118-Aug-15 16:31 
AnswerRe: item template of data list use anchor href that change by dynamicallyon user click after that fetch data by href Pin
Richard MacCutchan19-Aug-15 20:59
mveRichard MacCutchan19-Aug-15 20:59 

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.