Hello All, Could you please any body help me how to bind DataList control inside FormView control. I read the DataList control and added the DataSource to it & binded the data. But when browse that page FormView displaying all the values, but not the DataList values. I could not see binded records to DataList. Please suggest me how to resolve this. Cheers, kv sekhar
K V Sekhar
Posts
-
Binding DataList inside FormView -
From address problem in Sending MailHi Abijit, I tried your logic by sending a sample email to my email address[gamil]. But no use. The display name appears in 'from' but it also shows the 'userName' when we click on 'show deails' link. When i open my mail from inbox. It displays the from as 'donotreply@[mydomainhere].com'. But when i click on 'show details' link it displays like below. "donotreply@[mydomainhere].com" I don't want show 'UserName' in Recipient user. Because its a credential. Any solution? Regards, kv sekhar
-
From address problem in Sending MailHi Abijit. Thanks for ur response. donotreply@[mydomainhere].com is exist, but in-place of 'mydomain' we have our domain name. The mail actually delivers to given to address. But there it showing from address as 'admin@mydomain.com' which is username used in web.config mailSettings. But i need from address as 'donotreply@[mydomainhere].com'. any suggestions. regards, kv sekhar
-
From address problem in Sending MailHi all, I am trying send mail. I added email settings to web.config The problem is when i am sending mail, mail delivers. But with from address admin@mydomain.com [userName] but not 'donotreply@mydomain.com' any solution. To change the from address [avoiding UserName as From address]. Regards, sekhar
-
Creating Entity Class for XMLHi all, I have a XML file in below format. Could you please give me some suggestion how to create a entity class for below format of xml. 001 testsetting1 testsetting2 testsetting3 location1 location2 12000sf Regards kv sekhar
-
Web Deployment error for WebUserControl event [modified]Hi Dinesh, Thanks for your response. That was not a problem, because the application is running perfectly and the dropdown event fires and giving the results to me. No errors while building and running the WebSite. But there are bulid errors while building the DeploymentProject of above website. The errors i already posted in my above post. Thanks & Regards kv sekhar
-
Web Deployment error for WebUserControl event [modified]Hi Nath, Sorry for late response... The exact error message is
1.System.Web.UI.UserControl does not contain a definition for 'IndexChanged' and no extension method 'IndexChanged' accepting a first arguement of type 'System.Web.UI.UserControl' could be found.(are u missing a using directive or an assembly reference)
2.The type or namespace name 'MyUserControlUC' doesn't exist in the namespace 'ASP' (are u missing an assembly reference?)
This error i got at Default.aspx.cs page
private void InitializeComponent() { this.Load += new EventHandler(this.Page_Load); SampleUserControl1.IndexChanged += new ASP.MyUserControlUC.SelectedIndexChanged(ddl_items_SelectedIndexChanged);//Here i am getting error while building deployment project. }
regards, kv sekhar -
Web Deployment error for WebUserControl event [modified]Hi Dinesh, Sorry for late response... The exact error message is
1.System.Web.UI.UserControl does not contain a definition for 'IndexChanged' and no extension method 'IndexChanged' accepting a first arguement of type 'System.Web.UI.UserControl' could be found.(are u missing a using directive or an assembly reference)
2.The type or namespace name 'MyUserControlUC' doesn't exist in the namespace 'ASP' (are u missing an assembly reference?)
This error i got at Default.aspx.cs page
private void InitializeComponent() { this.Load += new EventHandler(this.Page_Load); SampleUserControl1.IndexChanged += new ASP.MyUserControlUC.SelectedIndexChanged(ddl_items_SelectedIndexChanged);//Here i am getting error while building deployment project. }
regards, kv sekhar -
Web Deployment error for WebUserControl event [modified]Hi Dinesh,
<%@ Register TagPrefix="uc1" TagName="SampleUserControl" Src="~/MyUserControlUC.ascx" %>
is right, in the post i wrote wrong. In register tag no error. Problem with at Initilization of UserControl events in form. any suggestions is appreciated.. Thanks & regards, kv sekhar -
Web Deployment error for WebUserControl event [modified]Hi Dinesh, Thanks for ur reply. But the WebUserControl are in sample project.i.e, in main website it self Regards, kv sekhar
-
Web Deployment error for WebUserControl event [modified]Hi All, I am deploying my website by using add webdeployment project. But in my website i have used the WebUserControls in my website. The WebUserControls events are handled in form[which contains WebUserControl] through Delegates & Event Handlers. These events of WebUserControl have been initialized at form Default.aspx Page Init event. When i build the Project it gives no errors, the site runs perfectly... But when build the Deployment project i got a compilation errors of WebUserControl events where i initilized at form Default.aspx page init event. Its giving error message like 'MyUserControlUC' could not found are u missing add reference. For sample: ========== MyUserControlUC.ascx
//delegate
public delegate void DropDownSelectedIndexChanged(object sender, EventsArgs e);
//event
public event DropDownSelectedIndexChanged IndexChanged;
//call the event
protected void ddl_items_SelectedIndex_Changed(object sender, EventsArgs e)
{
if(IndexChanged != null)
IndexChanged(sender,e);
}Default.aspx
<%@ Register TagPrefix="uc1" TagName="SampleUserControl" Src="~/MyUserControlUC.ascx" %>
Default.aspx.cs
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
InitializeComponent();
}
private void InitializeComponent()
{
this.Load += new EventHandler(this.Page_Load);
SampleUserControl1.IndexChanged += new ASP.MyUserControlUC.SelectedIndexChanged(ddl_items_SelectedIndexChanged);//Here i am getting error while building deployment project.
}private void ddl_items_SelectionIndexChanged(Object sender, EventArgs e)
{
//Code here to handle ...
}Thanks & Regards
modified on Tuesday, February 16, 2010 8:06 AM
-
Call window application from ASPX page on localhostIf your windows & web application resides on same system/server you can use System.Diagnostics.Process to run your window application.
System.Diagnostics.ProcessStartInfo info = new system.Diagnostics.ProcessStartInfo("D:\MyWindow.exe");//FullpathOfYourWindow
System.Diagnostics.Process p1 = System.Diagnostics.Process();p1.StartInfo = info;
p1.Start(); //Your windows application will run. -
How to get dropdownlist selected value in Page_Init eventThanks Gandhi, thanks for your suggestion
-
How to get dropdownlist selected value in Page_Init eventHi all, I am trying to read the dropdown selected value in Page_Init Event, but i couldn't. I have to dynamically add controls to form based on dropdown selected value.
please suggest me how to read dropdown selected value in Page_Init.
thanks in advance.
-
Merging or adding 2 different DataTables into Single DataTableHi thanks for your response.
But as i told in my post, there is no relation ship between them. Just they are totally 2 different tables, Only the no.of records were same.
I can't get the data from database as you told, bcz no key relation ship between them.
Any alternative.
-
setting value on ClinetClick and reading changed value on OnClik[Server Side]Here is the sample code.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GridView Export</title>
<script type="text/javascript" language="javascript">
function ChangeText()
{
var tBox = document.getElementById("TextBox1");
tBox.value = "New Text";
alert(tBox.value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" Text="Old Text"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" OnClientClick="javascript:ChangeText();" />
</div>
</form>
</body>
</html>the code behid page: Firm1.aspx.cs:
protected void Button1_Click(object sender, EventArgs e)
{
Response.write("New Text"+TextBox1.Text); //out put: "Old Text"[Given at design time]
}please suggest me where i did wrong.
-
setting value on ClinetClick and reading changed value on OnClik[Server Side]Hi all, I have a
TextBox and Button
. The Button have two events'OnClentClick'(javascript)
and'OnClick'(server side).
OnClientClick
of button i could able to set the value to textbox and i could see the value in TextBox. But whenOnClick
of Button i could not able to read the changed value of TextBox. Its giving value which i assigned at design time. But i could see the new value in textbox. Why? whats the reason. How to read that changed value on OnClick(Server Side]. Please suggest me how to do that. Thanks in advance. -
Merging or adding 2 different DataTables into Single DataTableHi All, I want to merge 2 tables. These 2 tables have different columns but the no.of records same.
DataTable dt1, DataTable dt2;
dt1: contains records like below ===============================
colA colB colC
a1 b1 c1
a2 b2 c2
a3 b3 c3dt2: contains records like below ===============================
colD colE colF
d1 e1 f1
d2 e2 f2
d3 e3 f3I have to make these two table into one single table like below
Required DataTable
colA colB colC colD colE colF
a1 b1 c1 d1 e1 f1
a2 b2 c2 d2 e2 f2
a3 b3 c3 d3 e3 f3How can we do that? I approached like, taken a DataTable and added columns of dt1 and dt2 the this table. then added the records to main DataTable through looping each record of dt1 and dt2. Is there any other way do this with out using loop statements. Both the tables are different, they don't have any relation between them, only the no.of records were same. Please suggest me how to this. Thanks in advance.
-
how to get table names in MS Access database [Solved]Hi Eddy, Thanks for your response. I got one more alternative for that...
OleDbConnection con = new OleDbConnection("Provider=microsoft.jet.oledb.4.0; data source="+Server.MapPath("~/App_Data/Sample.mdb"));
con.Open();
DataTable dt = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] {null, null, null, "TABLE"});
con.Close(); -
how to get table names in MS Access database [Solved]Hi, What is the query to get the list of table names for MS Access. In Sql Server : USE [MyDatabase] SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES In MS Access ? Thanks in advance.