16,004,778 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Far sh (Top 9 by date)
Far sh
29-Feb-12 2:16am
View
thanks for the reply.
as i mentioned i have used FindControl method based on dynamic table name:
TextBox tempTextboxLv = (TextBox)Table_Lv_ItemTemplate.FindControl("td_EditTemp2_5");
and also based on the listview name:
TextBox tempTextboxLv = (TextBox)lv_Uc_Module.FindControl("td_EditTemp2_5");
but still does not work.
i would appreciate if you can provide me some sample based on this situation.
thanks
Far sh
24-Feb-12 2:24am
View
Hi Bojjiaiah,
thanks for your answer.
actually my user control page is inside an updatepanel in my aspx page as below:
<asp:UpdatePanel ID="upn_ModuleContent" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:uc_Module_Temp ID="uc_Module_Temp1" runat="server" Visible="false" />
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btn_Home" EventName="Click" />
</Triggers>
based on what you mentioned i have tried:
foreach (Control c in MTMainForm.Controls)
{
if (c.GetType().Name.ToLower() == "uc_Module_Temp_ascx")
{
UserControl uc = (UserControl)c;
TextBox txt = (TextBox)uc.FindControl("tb2_AddModule");
Response.Write("Controlvalue: " + txt.Text + "</br>");
}
}
and also:
foreach (Control c in MTMainForm.Controls)
{
if (c.GetType().Name.ToLower() == "uc_Module_Temp1")
{
UserControl uc = (UserControl)c;
TextBox txt = (TextBox)uc.FindControl("tb2_AddModule");
Response.Write("Controlvalue: " + txt.Text + "</br>");
}
}
but still can not access to the textbox of my usercontrol page...
any other option or did i missed something?
thanks
Far sh
15-Dec-11 21:15pm
View
Thank Morteza for reply.
the updatepanel is in aspx page and the labels, textbox and all content is located at the usercontrol page. i have fixed it.
please check out the answer.
but for editing part i have done some thing like what you have mentioned and using itemDataBound function of listview.
protected void lvProduct_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem)
{
Label EmpIDLabel = (Label)e.Item.FindControl("EmpIDLabel");
System.Data.DataRowView rowView = e.Item.DataItem as System.Data.DataRowView;
EmpIDLabel.Text = rowView["EmpID"].ToString();
}
}
regards
Far sh
13-Dec-11 4:04am
View
thanks for the reply, but could you please show me how to build the property for the fieldset in ascx.cs page and in the aspx.cs page change the visibility of the fieldset to false or true. because i could do it for the panel:
Control panelControl31 = WebUserControl31.FindControl("Panel1");
Panel pControl1 = (Panel)panelControl31;
pControl1.Visible = false;
but i couldn't do it for the fieldset inside the panel.
really appreciate.
Far sh
5-Dec-11 4:59am
View
in my template i have 3 parts which include partial refreshing using update panel. my emphasis is on the 3rd panel which suppose to load different aspx page. i couldn't find the way when the user click on 2nd panel that is containing the sub menu, it should refresh the 3rd panel and show the new aspx page. preferably i don't want to use the iframe. is there other way to overcome this issue? Thanks&Regards
Far sh
1-Dec-11 21:20pm
View
uframe is combination of updatepanel and iframe, you can refer to the links which i have mentioned at my question to get to know it. if you have another solution to this problem i look forwards to hearing...
Far sh
31-Oct-11 3:46am
View
actually when i pass the data to second part, i want to show them as hyperlink be cause the second part is the sub-menu, then once the user click on the sub-menu the third part has to be refresh and show the details of the sub-menu.
here is my sample page code:
Process details: you can type something at the textbox then click at the Send Value button, the value will appear at the second panel, once you click at the pass the value button it will appear at the third panel.
i just want to show the data which has been sent from panel 1 to panel 2 as hyperlink then by click at the hyperlink refresh the third panel and show the details of the sub-menu.
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Sample Partial Refresh</title>
<script type= "text/javascript">
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager EnablePartialRendering="true" ID="ScriptManager1" runat="server">
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<contenttemplate>
<fieldset style="width:97%">
Panel 1
<asp:Label ID="Label1" runat="server" Text="This is a label!">
<br />
<asp:TextBox ID="TextBox1" runat="server">
<asp:Button ID="Button3" runat="server" Text="Send Value" onclick="Button3_Click" />
<br />
<asp:Button ID="Button1" runat="server" Text="Click Me" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="Update This Panel" OnClick="Button2_Click" />
</fieldset>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<contenttemplate>
<fieldset style=" width:20%; display:inline">
Panel 2
<asp:Label ID="Label4" runat="server">
<asp:Label ID="Label5" runat="server">
<asp:Label ID="Label2" runat="server" ForeColor="red" Text="Receive from Panel1" />
<asp:Button ID="Button4" runat="server" Text="Pass the value" onclick="Button4_Click" />
</fieldset>
<fieldset style="width:75%; display:inline">
Panel 3
<asp:Label ID="Label3" runat="server" ForeColor="blue" Text="Receive from Panel2" />
</fieldset>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button3" EventName="Click" />
</Triggers>
</div>
</form>
</body>
</html>
-------------------------------------
Default.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToLongTimeString();
Label2.Text = DateTime.Now.ToLongTimeString();
}
protected void Button2_Click(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToLongTimeString();
}
protected void Button3_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "m1")
{
Label4.Text = TextBox1.Text.ToString();
Labe
Far sh
27-Oct-11 23:01pm
View
Could you please guide me step by step to create this template?
or send me a sample page which is include 3 separate part using jQuery and updatePanel.(because i have no idea about jQuary and i'm new but i know it is one of the best way to get ride of this problem)
Appreciate your consideration.
Far sh
23-Oct-11 22:54pm
View
appreciate brother,
I'll go through...
Show More