Jump to content

.net Code Help Urgent!


Recommended Posts

Posted

.net MVC pattern lo checkbox create chesaka dani code behind I mean
checkbox value ni view ascx page lo ela pass cheydam with an if condition ? controller lo kuda code add cheyala?

ex : ila check box create chesanu
<input id="Checkbox1" name="copy_abc_xyz" type="checkbox"
value="1" /><b>abc xyz</b>
</p>

dinki controller and view lo checked value ni ela pass cheyali any idea


if condition ( checked value = "true" )
{
some paragraph should be displayed
}
else

{
error
}

koncham urgent please help...

thanks in advance...

Posted

galigannarao ani oka ID untundi, PM pettu. he may help you out !

Posted

oka bool variable teesukoni check box check danni true set chesi controllerki passchesi kummey inka

Posted

<asp:TextBox id="work" runat="server" />
<asp:CheckBox id="check1"
Text="check box name" TextAlign="Right"
AutoPostBack="True" OnCheckedChanged="Check"
runat="server" />

<script runat="server">
Sub Check(sender As Object, e As EventArgs)
if check1.Checked then
work.Text="what ever is your para"
else
work.Text="error message"
end if
End Sub
</script>

Posted

[quote name='sqlhelp' timestamp='1327982724' post='1301362078']
PM chesanu.. reply chestharu ani waiting
[/quote]

paina already sol kuda cheppesinattu unnadu gaa

Posted

[quote name='galigannarao' timestamp='1327982710' post='1301362077']
oka bool variable teesukoni check box check danni true set chesi controllerki passchesi kummey inka
[/quote]

bool variable ni ekada view lo set chesthama or controller method lo na ?

ikada inko point added

checkbox oka view page lo undi... condition inko view page lo rayali...

controller is linked with condition view page..

Posted

[quote name='sqlhelp' timestamp='1327982964' post='1301362100']

bool variable ni ekada view lo set chesthama or controller method lo na ?
[/quote]
Modello nuvvu public properties create chestavuga so andulo oka bool property create chesuku. elago nee pagelo class yokka object create chestavuga so checkbox check ayte true set chey aa propertyki lekaote false. then pass that object to controller and use it.

Posted

[quote name='sqlhelp' timestamp='1327982964' post='1301362100']
bool variable ni ekada view lo set chesthama or controller method lo na ?

ikada inko point added

checkbox oka view page lo undi... condition inko view page lo rayali...

controller is linked with condition view page..
[/quote]
adi cheppu mari. i got ur point. aspx page lo user control use chestunnavu antena. then do one thing create a public property in the user control and set the value in the aspx and use that in the ascx.

Posted

bool value ni ilage na pass chesedhi ?

<%if ((bool)ViewData["abc xyz"] == true)
{ %>
paragraph
<%}
else
{%>
paragraph



I am getting an error saying check if value is 0

×
×
  • Create New...