Click here to Skip to main content
15,921,606 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ASP:Image Control Pin
Rutvik Dave23-Jul-09 11:39
professionalRutvik Dave23-Jul-09 11:39 
Questionerror creating directory in ftp : access Denied Pin
Dhrumil_Shukla22-Jul-09 2:43
Dhrumil_Shukla22-Jul-09 2:43 
AnswerRe: error creating directory in ftp : access Denied Pin
SeMartens22-Jul-09 3:03
SeMartens22-Jul-09 3:03 
AnswerRe: error creating directory in ftp : access Denied Pin
Brij22-Jul-09 3:10
mentorBrij22-Jul-09 3:10 
AnswerRe: error creating directory in ftp : access Denied Pin
Abhijit Jana22-Jul-09 3:27
professionalAbhijit Jana22-Jul-09 3:27 
AnswerRe: error creating directory in ftp : access Denied Pin
Vasudevan Deepak Kumar22-Jul-09 3:34
Vasudevan Deepak Kumar22-Jul-09 3:34 
AnswerRe: error creating directory in ftp : access Denied Pin
Abhishek Sur22-Jul-09 3:37
professionalAbhishek Sur22-Jul-09 3:37 
QuestionCreating dynimic text boxes on selection of drop down list Pin
jrsreenivas22-Jul-09 2:26
jrsreenivas22-Jul-09 2:26 
Hi Friends,
My reuirement is need to generate text boxes dynamically on the selection of drop down list where the drop down list
contains no and on selection of drop down list i need to create text boxes . i am able
create text box dynamically but when i select the drop down list whole page refreshes and
displays the text boxes . but what i need is the page should not refresh and the text boxes
should be displayed on selection of drop down .I have added update panel when i add these after selection
of drop down the page hangs up and no dynmic contols are created . and if i comment the update panels i am able
to get the text boxes .

Please help me to solve this problem

My id : jrsreenivas@hotmail.com


aspx.code
------------
<form id="form1" runat="server">
<asp:ScriptManager ID="smRedemption" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<div>
<asp:UpdatePanel ID="upRedemption" runat="server" >
<ContentTemplate>
<asp:Panel ID="pnlRedemption" runat="server">
<table>
<tr>
<td>
<asp:DropDownList ID="ddlAdoption" runat="server" OnLoad="ddlAdoption_Load" OnSelectedIndexChanged="ddlAdoption_OnSelectedIndexChanged" AutoPostBack="true" >
</asp:DropDownList>
<asp:Label ID="lblCount" runat="server" Visible="false" ></asp:Label>
</td>
</tr>
<tr id="trAdoptionNo" runat="server" visible="false" >
<td>
<asp:Label ID="lblMessage" runat="server" Visible="false" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDisplay" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Panel ID="pnlDisplay" runat="server">
<table>
<tr>
<td>
<asp:PlaceHolder ID="phAdoption" runat="server" Visible="true" EnableViewState="true" ></asp:PlaceHolder>
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnkRedemption" runat="server" Text="Next" onclick="lnkRedemption_Click" Visible="false" ></asp:LinkButton>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlAdoption" />
</Triggers>
</asp:UpdatePanel>

</div>
</form>

c# code
----------------

protected void Page_Load(object sender, EventArgs e)
{

if (!Page.IsPostBack)
{
ddlAdoption.Items.Insert(0, new ListItem("--Select--", "0"));

}
}

protected void ddlAdoption_OnSelectedIndexChanged(object sender, EventArgs e)
{
lblCount.Text = ddlAdoption.SelectedValue;
int adoptionCount = Convert.ToInt32(lblCount.Text);
for (int i = 0; i < adoptionCount; i++)
{
TextBox txtAdoptionNo = new TextBox();
Label lblBreak = new Label();


lblBreak.Text = "<br/>";
txtAdoptionNo.ID = "txtAdoptionNo" + i;

RequiredFieldValidator rfvAdoptionNo = new RequiredFieldValidator();
rfvAdoptionNo.ID = "rfvAdoptionNo"+i;
rfvAdoptionNo.ControlToValidate = txtAdoptionNo.ID;
rfvAdoptionNo.ErrorMessage = "Cannot be Empty";


phAdoption.Controls.Add(txtAdoptionNo);
phAdoption.Controls.Add(rfvAdoptionNo);
phAdoption.Controls.Add(lblBreak);

}

lnkRedemption.Visible = true;
}

protected void ddlAdoption_Load(object sender, EventArgs e)
{
for (int i = 1; i < 10000; i++)
{
ddlAdoption.Items.Add(new ListItem(i.ToString()));
}
}
AnswerRe: Creating dynimic text boxes on selection of drop down list Pin
Abhijit Jana22-Jul-09 3:39
professionalAbhijit Jana22-Jul-09 3:39 
GeneralRe: Creating dynimic text boxes on selection of drop down list Pin
jrsreenivas22-Jul-09 3:50
jrsreenivas22-Jul-09 3:50 
GeneralRe: Creating dynimic text boxes on selection of drop down list Pin
Abhijit Jana22-Jul-09 5:16
professionalAbhijit Jana22-Jul-09 5:16 
AnswerRe: Creating dynimic text boxes on selection of drop down list Pin
Abhishek Sur22-Jul-09 3:42
professionalAbhishek Sur22-Jul-09 3:42 
GeneralRe: Creating dynimic text boxes on selection of drop down list Pin
jrsreenivas22-Jul-09 3:48
jrsreenivas22-Jul-09 3:48 
QuestionRunning ASP.NET web project with unsafe C# code Pin
Chesnokov Yuriy22-Jul-09 2:23
professionalChesnokov Yuriy22-Jul-09 2:23 
AnswerRe: Running ASP.NET web project with unsafe C# code Pin
Chesnokov Yuriy22-Jul-09 19:31
professionalChesnokov Yuriy22-Jul-09 19:31 
Questionhandling add contact event in outlook 07 Pin
ACMA_198022-Jul-09 1:05
ACMA_198022-Jul-09 1:05 
AnswerRe: handling add contact event in outlook 07 Pin
Manas Bhardwaj22-Jul-09 1:08
professionalManas Bhardwaj22-Jul-09 1:08 
JokeRe: handling add contact event in outlook 07 Pin
Abhijit Jana22-Jul-09 1:12
professionalAbhijit Jana22-Jul-09 1:12 
AnswerRe: handling add contact event in outlook 07 Pin
Abhijit Jana22-Jul-09 1:08
professionalAbhijit Jana22-Jul-09 1:08 
GeneralRe: handling add contact event in outlook 07 Pin
ACMA_198022-Jul-09 1:13
ACMA_198022-Jul-09 1:13 
QuestionTextBox onTextChanged Event Pin
megivimal22-Jul-09 1:02
megivimal22-Jul-09 1:02 
AnswerRe: TextBox onTextChanged Event Pin
Brij22-Jul-09 1:38
mentorBrij22-Jul-09 1:38 
GeneralRe: TextBox onTextChanged Event Pin
megivimal22-Jul-09 5:07
megivimal22-Jul-09 5:07 
GeneralRe: TextBox onTextChanged Event Pin
DoctorMick22-Jul-09 6:08
DoctorMick22-Jul-09 6:08 
GeneralRe: TextBox onTextChanged Event Pin
megivimal22-Jul-09 20:23
megivimal22-Jul-09 20:23 

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.