hai Friends,
I m creating web application page in that fields are
departuredate = textbox
lodging = textbox
food claim = textbox
Daily allowances = textbox
Add(button)
now My requirement is when the user choose lodging and food claim text boxes daily allowance colmun ll be read only mode. like the same if daily allowances choosed lodging & food claim read only mode.
how to make a code?
Loading
Sanjeeb LenkaPosted Aug 14, 2013, 5:45 AM
in aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %>
in .cs page:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default7 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void TxtLdg_TextChanged(object sender, EventArgs e)
{
if (TxtLdg.Text != string.Empty)
{
TxtFdAl.Enabled = false;
TxtFdAl.BackColor = System.Drawing.Color.Gray;
}
else
{
TxtFdAl.Enabled = true;
TxtFdAl.BackColor = System.Drawing.Color.White;
}
}
protected void TxtFoAl_TextChanged(object sender, EventArgs e)
{
if (TxtFoAl.Text != string.Empty)
{
TxtFdAl.Enabled = false;
TxtFdAl.BackColor = System.Drawing.Color.Gray;
}
else
{
TxtFdAl.Enabled = true;
TxtFdAl.BackColor = System.Drawing.Color.White;
}
}
protected void TxtFdAl_TextChanged(object sender, EventArgs e)
{
if (TxtFdAl.Text != string.Empty)
{
TxtFoAl.Enabled = false;
TxtLdg.Enabled = false;
TxtLdg.BackColor = System.Drawing.Color.Gray;
TxtFoAl.BackColor = System.Drawing.Color.Gray;
}
else
{
TxtLdg.Enabled = true;
TxtFoAl.Enabled = true;
TxtLdg.BackColor = System.Drawing.Color.White;
TxtFoAl.BackColor = System.Drawing.Color.White;
}
}
}
Iftikar HussainPosted Aug 14, 2013, 6:00 AM
Rocky RockyPosted Aug 14, 2013, 5:34 AM
check my code and let me back?
Iftikar HussainPosted Aug 14, 2013, 5:17 AM
Rocky RockyPosted Aug 14, 2013, 5:09 AM
textbox wont be goes on read only mode
Iftikar HussainPosted Aug 14, 2013, 4:05 AM
Rocky RockyPosted Aug 14, 2013, 3:52 AM
when i choose loging not working as i m expected?
Rocky RockyPosted Aug 14, 2013, 3:47 AM
How to call can u liittle provide as on
Iftikar HussainPosted Aug 14, 2013, 3:36 AM
Regards,
Iftikar
Sanjeeb LenkaPosted Aug 14, 2013, 3:29 AM
if you are not able to do it n javascript try to do it in textchanged event of textbox...
Rocky RockyPosted Aug 14, 2013, 3:24 AM
i m making web application is it working ah?
Iftikar HussainPosted Aug 13, 2013, 2:09 AM
Regards,
Iftikar
Rocky RockyPosted Aug 13, 2013, 2:01 AM
i wanna set textbox when the user enter lodging means at that time daily allowance is read only mode after add the details daily allowance ll show as normal.
Iftikar HussainPosted Aug 13, 2013, 1:57 AM
Regards,
Iftikar
Rocky RockyPosted Aug 13, 2013, 1:54 AM
How to call javascript in my asp.net code?
Iftikar HussainPosted Aug 13, 2013, 1:51 AM
Regards,
Iftikar
Rocky RockyPosted Aug 13, 2013, 1:40 AM
My asp.net code:
===========
Iftikar HussainPosted Aug 13, 2013, 1:36 AM
Regards,
Iftikar
Rocky RockyPosted Aug 13, 2013, 1:34 AM
When I choose the Lodging and food claim ,daily allowance also enable its not on read only mode.
what can i do?
Iftikar HussainPosted Aug 13, 2013, 1:26 AM
Regards,
Iftikar
Rocky RockyPosted Aug 13, 2013, 1:22 AM
nt woriknig these java script is any other code is there?
Iftikar HussainPosted Aug 12, 2013, 8:10 AM
Try like this
Regards,
Iftikar