|
<asp:DropDownList ID="ddlBusinessLinesL1" runat="server" onclick="return DisableBLPostBack(ddlBusinessLinesL1);" />
Javascript Function
function DisableBLPostBack(ddlb)
{
var ddlbus=ddlb.options.selectedIndex;
if(ddlbus==1)
{return false;}else{return true;}}
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
DataSet ds1;
ds1 =(DataSet)Session["id"].ToString();
there is a conversion error.
please help to rectify the problem.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
The Good way:
1) Check if Session["id"] is not null.
2) Use Session["id"].GetType() to identify the name and whether it is castable to a DataSet.
3) Then do a cast.
-- modified at 5:54 Thursday 19th July, 2007
|
|
|
|
|
Hi Vasudevan,
But Gettype does not provide arguments.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
But Why you want to store that Session varaible into dataset
Any specific reason ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: But Why you want to store that Session varaible into dataset
Session variable into DataSet ?
|
|
|
|
|
Oh Sorry!
Session("ID").GetType()
I would update the original post also. Sorry again! And thanks for the pointer.
|
|
|
|
|
It's ok.
By the way thanks for the help
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi,
The below code works fine.The problem in your code is you are converting the session value into String and then casting to dataset so it is giving problem.
Actually ypu need to convert the session value directly to dataset.
Example:-
DataSet ds1;
ds1 =(DataSet)Session["id"];
Regards,
Sandeep Kumar.V
|
|
|
|
|
But the question is What is the logic converting a Session Variable into Dataset ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
So we r here for making fool around?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
The logic for converting the session to dataset is just by doing explicit type casting directly.
Regards,
Sandeep Kumar.V
|
|
|
|
|
First Consider purpose of Dataset ....
DataSet Conatins table Why ? Table can have n number of columns why ?
I m sure it not for storing Session varaible directly into dataset
What you think ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks...
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
hello frnd,
i have a XML file in the CD , and the Cd is located in the CD ROM Drive located in the Computer which is not under my domain and i want to render that xml file,
To get the path of the file i use
server.Getobject("scripting.filesystemobject")
try to get the Driveinfo but it shows an error as
CTL_PATH_NOT_FOUND error 0x800A004C
what can i do ???? ...please help
Thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Is there any way of being able to open a database at the begging on a page, and close it at the end, where "#include file=..." have been used?
I'm currently having problem with declaration blocks etc? I've been told the global.asax however this hasn't worked
|
|
|
|
|
You would be better creating a DAL that maintains the connection information then for each database query have it open the connection, process the query, and then close the connection. You can then share the DAL across many pages which removes your need to store any kind of database information in the page classes.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
When a user control is loaded into a other control such az panel or other usercontrol dynamically the
events do not fire.
|
|
|
|
|
Which Event?
find control of usercontrol and Use EventHandler for that control
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Thanks For Answer.
For example my usercontrol have one button ,when my user control add to another usercontrol click event not fier but usercontrol load event is fiered.
|
|
|
|
|
post ur ascx.cs file code and also ascx html source code
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
<br />
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_CP_Product_Category.ascx.cs" Inherits="Products_CP_ModifyControl_uc_CP_Product_Category" %><br />
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc2" %><br />
<%@ Register Src="WebUserControl2.ascx" TagName="WebUserControl2" TagPrefix="uc3" %><br />
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"<br />
Namespace="System.Web.UI" TagPrefix="asp" %><br />
<%@ Register Src="uc_Mdf_Products_Category.ascx" TagName="uc_Mdf_Products_Category"<br />
TagPrefix="uc1" %><br />
<table style="width: 100%"><br />
<tr><br />
<td style="width: 100%; height: 21px;"><br />
<table><br />
<tr><br />
<td style="width: 100px"><br />
<asp:Panel ID="pnl_Buttons" runat="server" Height="50px" Width="125px"><br />
<table><br />
<tr><br />
<td style="width: 100px"><br />
<asp:Button ID="btn_Add" runat="server" Text="Add" OnClick="btn_Add_Click" /></td><br />
<td style="width: 100px"><br />
<asp:Button ID="btn_Update" runat="server" Text="Update" OnClick="btn_Update_Click" /></td><br />
<td style="width: 100px"><br />
<asp:Button ID="btn_Delete" runat="server" Text="Delete" OnClick="btn_Delete_Click" /></td><br />
<td style="width: 100px"><br />
<asp:Button ID="btn_Confrimed" runat="server" Text="Confrimed" OnClick="btn_Confrimed_Click" /></td><br />
<td style="width: 100px"><br />
<asp:Button ID="btn_ShowProducts" runat="server" Text="ShowProducts" /></td><br />
</tr> <br />
</table><br />
</asp:Panel><br />
</td><br />
</tr><br />
<tr><br />
<td style="width: 100px; height: 154px;"><br />
<asp:Panel ID="pnl_Controls" runat="server" Visible="True"><br />
</asp:Panel><br />
</td><br />
</tr><br />
<tr><br />
<td style="width: 100px; height: 33px;"><br />
<asp:Button ID="btn_Back" Text = "Back" runat="server" Visible="False" Width="85px" OnClick="btn_Back_Click"><br />
</asp:Button><br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Drawing;<br />
using System.Drawing.Drawing2D;<br />
<br />
public partial class Products_CP_ModifyControl_uc_CP_Product_Category : System.Web.UI.UserControl<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
protected void btn_Add_Click(object sender, EventArgs e)<br />
{<br />
pnl_Buttons.Visible = false;<br />
pnl_Controls.Visible = true;<br />
btn_Back.Visible = true;<br />
Session["Action"] = "0";<br />
pnl_Controls.Controls.Add(LoadControl("~/Products/CP/ModifyControl/uc_Mdf_Products_Category.ascx"));<br />
}<br />
protected void btn_Back_Click(object sender, EventArgs e)<br />
{<br />
pnl_Buttons.Visible = true;<br />
pnl_Controls.Visible = false;<br />
btn_Back.Visible = false;<br />
pnl_Controls.Controls.Clear();<br />
}<br />
protected void btn_Update_Click(object sender, EventArgs e)<br />
{<br />
pnl_Buttons.Visible = false;<br />
pnl_Controls.Visible = true;<br />
btn_Back.Visible = true;<br />
Session["Action"] = "1";<br />
pnl_Controls.Controls.Add(LoadControl("~/Products/CP/ModifyControl/uc_Mdf_Products_Category.ascx"));<br />
}<br />
protected void btn_Delete_Click(object sender, EventArgs e)<br />
{<br />
Products_CP_ModifyControl_WebUserControl ctl = (Products_CP_ModifyControl_WebUserControl) LoadControl("~/Products/CP/ModifyControl/WebUserControl.ascx");<br />
ctl.ID = "webusercontrol1";<br />
pnl_Controls.Controls.Add(ctl);<br />
}<br />
protected void btn_Confrimed_Click(object sender, EventArgs e)<br />
{<br />
Session["Type"] = 1;<br />
pnl_Controls.Controls.Add(LoadControl("~/Products/CP/ModifyControl/WebUserControl2.ascx"));<br />
}<br />
}<br />
<br />
<br />
add this control :
<br />
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="Products_CP_ModifyControl_WebUserControl" %><br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /><br />
<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
public partial class Products_CP_ModifyControl_WebUserControl : System.Web.UI.UserControl<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
Response.Write("ok");<br />
}<br />
}<br />
<br />
Button1_Click not fier
-- modified at 6:13 Thursday 19th July, 2007
|
|
|
|
|
Where is ur Button1 control?
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button"
-- modified at 6:41 Thursday 19th July, 2007
|
|
|
|
|
Hi Everyone,
I have stored a Dataset in Session Variable in code-behind file(aspx.vb). I have to loop through the contents of this dataset using vbscript in aspx file. Can anyone help me in this regard.
Regards,
Manowj
|
|
|
|