|
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
|
|
|
|
|
Dear all,
We have two client servers,
In one server (Performance Tab in DefaultAppPoolProperties ) IdletimeOut option is 20 and for anthor one is 180.Here i need to know the differences between two time limits. that is notning 20 and 180.
Can any one can give idea regarding this concept?
thanks in advance,
eswar.
|
|
|
|
|
i m using dataadapter to handle dataset..the date is shown in the datagrid..now i want to update the records edited by the user
i have used one button to show the records,(in which i hv declared dataadapters and dataset)
and behind "edit record" button i want to write the code for updation
if i use the command
DataAdapter.Update(Dataset);
what should i do as the dataadpter and dataset are declared behind the other button??
is there any other option
( i m not using stored procedures)
$h@ma!|@
|
|
|
|
|
$h@ma!|@ wrote: what should i do as the dataadpter and dataset are declared behind the other button??
is there any other option
In this method you won't get DataSet object in Update button click since it is declared in the View button click. So what you can do is, create a new dataset from the user entered values and update that to DB. Or store the dataset in session temporarily, and in update button click modify the dataset records and call DataAdapter.Update() method.
|
|
|
|
|
thx but i dun understand how to create dataset from user entered values and update to db doh:
$h@ma!|@
|
|
|
|
|
hi,
i have a question that ,how we can track the client machine..like say example
i have a web application which my clients have access to it and i want to treck some how .. that user are active or not with his activity..
means here server can track their users every time ...
is it possible here in asp.net ...
and also can we treck that user where user had closed that web application or system crash.. so how can i know that this user are no longer active with this application.
Deepak Gedia
|
|
|
|
|
Deepak Gedia wrote: and also can we treck that user where user had closed that web application or system crash.
You need to use combination of session and application variables in Global.asax or in any HTTPModule . When user closes browser, no event will be fired on server. You can track session out from session_end event. This event will be fired when Session.Abandon() is called or when Session times out.
So keep an Application variable that holds Active users. When new sessions are created, Session_Start event will be fired. Inside this event you need to increase the application variable count. Application variable count should be decremented when session_end fires. To get active users print Application variable.
|
|
|
|
|
thnx for replying ... but what happens when the system crashes. at that time i dont think so the Session_End Event fires .... how can i treck that
see i am developing an time tracker application for the internal employees in asp.net
the thing is that the user logs in but some how if they close the window or application crashes or machine how i can set that users logout time .. thats the problem i am facing i even tryed out for the push architecture but .. didnt get the response much..
|
|
|
|
|
Deepak Gedia wrote: but what happens when the system crashes. at that time i dont think so the Session_End Event fires .... how can i treck that
Which system crashes ? Client machine or Server. If client machine crashes, immediately session_end won't be fired. It will be fired when session end for the user. By default it will be 20mins. After that it will fire session_end event. But if server machine is crashing, I am sorry not even session_end, nothing will be fired.
Deepak Gedia wrote: the thing is that the user logs in but some how if they close the window or application crashes or machine how i can set that users logout time
Same way what I told in the previous posts. To understand how session and it's event works, better take a good ASP.NET book and learn.
Happy Programming
|
|
|
|
|
How can i a store a data table value, that i required in more than one page and should be specific to user?.....
|
|
|
|
|
anujose wrote: How can i a store a data table value, that i required in more than one page and should be specific to user?.....
Store DataTable object in Session
|
|
|
|
|
Can you give me a example?is it same like i am storing in a cache variable ?
Like this
Cache["dt"]=dttable;
dttable=(datatable) Cache["dt"];
can i use ?
Session["dt"]=dttable;
dttable=(datatable) Session["dt"];
if it's possible is it good to store a datatable to a seesion Variable?
|
|
|
|
|
You can go with second method. Cache is not user specific. It will be common for all users accessing website. Session keeps datatable user specific.
anujose wrote: if it's possible is it good to store a datatable to a seesion Variable?
This depends on the size of your datatable. If it is pretty big, then this method might cause performance issues. If it is small object then I think there is no issues.
|
|
|
|