Click here to Skip to main content
16,004,778 members

Comments by venkatrao palepu (Top 34 by date)

venkatrao palepu 25-Feb-13 9:36am View    
Hi,
thanks for quick reply.
I am looking for to monitor a web service for every 10 mins. If any time the service is get stopped Send a mail to the user.

Thanks
Venkat.
venkatrao palepu 21-Nov-12 7:27am View    
Hi Farooq,

Thanks for the quick reply,

As per you guys suggested, whatever we are going to place in updatepanel that will only refresh when the event fire happens on page.

I have one doubt here,

<asp:AsyncPostBackTrigger ControlID="yourfeild" EventName="RowCommand" />

Here suppose if it is button control we will give the ControlID as button ID and Eventname as Button1_Click.

In my application i am using the TreeView control,
I will mention the ControlID as TreeView ID and for EventName what i have to mentioned.?

Could you please guild me on this?

Thanks
Venkat.
venkatrao palepu 21-Nov-12 7:13am View    
Deleted
Hi Krunal,

Thanks for quick reply.

I have tried the above code, still it's refreshing the above page.

<asp:ScriptManager ID="scr" runat="server">

<table class="style1">
<tr>
<td class="style2" colspan="2">
<asp:Image ID="Image1" runat="server" Height="50px"
ImageUrl="~/Test_Image.Jpeg" />
</td>
</tr>
<tr>
<td class="style3">
<asp:TreeView ID="TreeView1" runat="server">
<nodes>
<asp:TreeNode NavigateUrl="~/Java.aspx" Text="Java" Value="Java">
<asp:TreeNode NavigateUrl="~/Springs.aspx" Text="Springs" Value="Springs">

<asp:TreeNode NavigateUrl="~/HiberNet.aspx" Text="Hibernet" Value="Hibernet">


<asp:TreeNode Text="DotNet" Value="DotNet">
<asp:TreeNode NavigateUrl="~/VB.aspx" Text="VB" Value="VB">
<asp:TreeNode NavigateUrl="~/CSharp.aspx" Text="C#" Value="C#">



</td>
<td>
<asp:UpdatePanel ID="updatepanel1" runat="server">
<contenttemplate>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">


</td>
</tr>
</table>

Could you please check the code and let me know if i have done wrong anywhere?

Thanks
Venkat.
venkatrao palepu 31-Jul-12 6:01am View    
Hi Sergey,

I have updated the Question with code that i am using. Could you please help me if you have any idea?

Thanks
venkat.
venkatrao palepu 7-Jul-12 5:54am View    
Hi Sandeep,

Please find the below code that i have written.
Aspx Page:
----------


<asp:TreeView ID="TreeView1" runat="server" ShowCheckBoxes = "Leaf"
ontreenodedatabound="TreeView1_TreeNodeDataBound1" ShowLines="True"
>


Aspx.cs
-------

protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
cn.Open();
SqlCommand cmd = new SqlCommand("select ID,Task,ParentTask from TreeView_Tbl where ParentTask IS NULL", cn);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
TreeNode root = new TreeNode(ds.Tables[0].Rows[i][1].ToString(), ds.Tables[0].Rows[i][0].ToString());
root.SelectAction = TreeNodeSelectAction.SelectExpand;
CreateNode(root);
TreeView1.Nodes.Add(root);
}
cn.Close();
TreeView1.CollapseAll();


}


}
void CreateNode(TreeNode node)
{
DataSet ds1 = new DataSet();
SqlCommand cmd1 = new SqlCommand("select ID,Task,ParentTask from TreeView_Tbl where ParentTask =" + node.Value,cn);
SqlDataAdapter da = new SqlDataAdapter(cmd1);
da.Fill(ds1);
if (ds1.Tables[0].Rows.Count == 0)
{
return;
}
for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
{
TreeNode tnode = new TreeNode(ds1.Tables[0].Rows[i][1].ToString(), ds1.Tables[0].Rows[i][0].ToString());
tnode.SelectAction = TreeNodeSelectAction.Expand;
node.ChildNodes.Add(tnode);
CreateNode(tnode);
}
}

protected void TreeView1_TreeNodeDataBound1(object sender, TreeNodeEventArgs e)
{
if (e.Node.ChildNodes.Count == 0)
{

}
}