|
asp.net provides you login controls if you follow them then you need to write even a single line of code....
Government Dyal Singh College Lahore.
|
|
|
|
|
i am not using login control..
i simply want a code by which when i click the signout link the page goes to login page and then there is no way to go back..
|
|
|
|
|
Hi,
R u facing any specific problem ot u want complete code?
Regards
Anil Pal
|
|
|
|
|
me want a complete code..
|
|
|
|
|
that will cost you lakh crore....
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
actually when i click the signout link it goes to the login page but after when i click the browser back button it comesw again to the previous page...
|
|
|
|
|
you can do this using js
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
merahul wrote: if anybody have the proper code than mail me at...
rahulshrma@gmail.com
No one will send you the code like this way. If you have some specific problem then ask here, every body will help you.
merahul wrote: i am using a usercontrol page.working is to logout.
You want to create a user control for logout?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
merahul wrote: if anybody have the proper code than mail me at...
rahulshrma@gmail.com
Wouldn't it be simpler if we just sent it to your professor?
Jon
Smith & Wesson: The original point and click interface
|
|
|
|
|
ha ha....
gud joke...
but i am not in the mode...ok..if u have it then tell me otherwise donot waste my time...
|
|
|
|
|
merahul wrote: ok..if u have it then tell me otherwise donot waste my time...
excuse us? who is wasting out time with silly questions then?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
merahul wrote: if u have it then tell me otherwise donot waste my time
Yes, I have exactly the answer you are looking for.
Jon
Smith & Wesson: The original point and click interface
|
|
|
|
|
Usage of static variables in web pages looks really cool. But I have a minor requirement over it. "static" shares the variable across all the users. Is there any similar qualifier that restricts the variable associate with the instance specific usage? that doesn't get shared across multiple users? It will be nice if we have something like "user-static". . Just checked,There's no such thing. let's take the usual way,sessions.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Stick it in the Session then.
|
|
|
|
|
Hi,
I have a class file: dbtest and a have create a static public function that returns values from database.
Since its an static public function so i can access it as dbsale.function().
Now I wanted to know the disadvantages of this approach when say there are some 1000 call at a time for this function.
I have searched a lot and found examples of using static public functions but no where I found it to be used for calling a database operation.
Thanks in advance.
Regards
Vijay V.
Yash Softech
|
|
|
|
|
hi,
Now what u want?
Regards
Anil Pal
|
|
|
|
|
I wanted to know the disadvantages of this approach when say there are some 1000 call at a time for this function.
Vijay V.
Yash Softech
|
|
|
|
|
I think I can equate this multi-user thing to a multithreaded environment. You can use public static functions, there will be no problem. But if you are using static objects inside your function, then there's a one. There are big chances your static objects get overwritten with calls from other clients. If you are using local objects or instance members inside the function, then there wouldn't be any problem.
This is all a guess. I haven't tried this in Asp.net
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Thanks ViNic for your reply.......
Can u focus on the following code is this one is correct?
BinaryTree.cs file inside appcode
public class BinaryTree
{
public static ArrayList dlist = new ArrayList();
public static void FetchDownlineID(long uid)
{
BinaryTree bt = new BinaryTree();
bt = BinaryTree.fetchIdInfo(uid);//fetches user info
if (bt.Aid > 0)
{
dlist.Add(bt.Aid);
BinaryTree.FetchDownlineID(bt.Aid);
}
if (bt.Bid > 0)
{
dlist.Add(bt.Bid);
BinaryTree.FetchDownlineID(bt.Bid);
}
if (bt.Cid > 0)
{
dlist.Add(bt.Cid);
BinaryTree.FetchDownlineID(bt.Cid);
}
}
}
now this function is called on pageload as user's open page & result is bind to gridview...
as follows----------
public partial class User_DownlineLists : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
bindGridView();
}
protected void bindGridView()
{
if (Session["User"] != null)
{
long id = UserDetails.FetchUserId(Session["User"].ToString());
BinaryTree.dlist.Clear();
BinaryTree.FetchDownlineID(id);
Sort();//this function sort list datewise
GridView1.DataSource = BinaryTree.dlist;
GridView1.DataBind();
}
else
{
Response.Redirect("~/Home.aspx");
}
}
}
Vijay V.
Yash Softech
|
|
|
|
|
No, This looks truly bad to me.
VijayVishwakarma wrote: public static ArrayList dlist = new ArrayList();
public static void FetchDownlineID(long uid)
You might have read a "rant" from me just above your message. That says why you should not do it. Though every member would create a new object of your BianryTree, it's dlist would be shared.
VijayVishwakarma wrote: if (bt.Aid > 0)
{
dlist.Add(bt.Aid);
When one client does the above code, Another client could potentially execute the below code.
BinaryTree.dlist.Clear(); .
You get the idea?
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Thanks a lot....
Vijay V.
Yash Softech
|
|
|
|
|
My evet handler is this
protected void GV_Main_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "onGridViewRowSelected('" + m_iRowIdx.ToString() + "')");
}
m_iRowIdx++;
}
Which perform a selected row color change.This call a java script
Which is like this
< script language="javascript" type="text/javascript> var gridViewCtlId = '<%=GV_Main.ClientID%>';
var gridViewCtl = null;
var curSelRow = null;
function getGridViewControl()
{
if (null == gridViewCtl)
{
gridViewCtl = document.getElementById(gridViewCtlId);
}
}
function onGridViewRowSelected(rowIdx)
{
var selRow = getSelectedRow(rowIdx);
if (curSelRow != null)
{
//curSelRow.style.backgroundColor = '#ffffff';
curSelRow.style.backgroundColor = '';
}
if (null != selRow)
{
curSelRow = selRow;
//curSelRow.style.backgroundColor = '#ff0022';
curSelRow.style.backgroundColor = '#D1DDF1';
}
}
function getSelectedRow(rowIdx)
{
getGridViewControl();
if (null != gridViewCtl)
{
return gridViewCtl.rows[rowIdx];
}
return null;
}
When a run application on dafault page 1 it is work fine ,but as I change page is is not working .Grigview use paging
Please tell me my error or give me a solution.
Thanks
adilkhan
|
|
|
|
|
can you tell me if your gridview is in content placeholder? If yes, Check the page source to find the id of the gridview. If u are using content placeholder, then the id of the gridview will change to ctl_01_gridview or something.
So the javascript is not able to find the gridview.
Check this first.
Vijay V.
Yash Softech
|
|
|
|
|
thanks to gave me a solution .
yes this in content placeholder but i alert this ID,its alert fine once when default page occrue.ut as i click on on next page of GridView alert is not fired ,means that second time java script not call.
adilkhan
|
|
|
|
|
Hello
first of sorry for the bad english but im dyslexic
im working on a simpel httpHandler at the momment but my problem is that i simply cant regiser it in my web.config, i have tryed adding a assembly name (im on the WWD so i dont think i can actly make assembys?) bouth whith my application name and whith the App_Code (bouth whith the handler in the App_Code folder And whith it in the root, and if is the App_Code folder DotNet wont let me build my page at all)
after 3 houres of forum searching im truey lost, i whent on the MSDN and copy pasted there helloworld exampel but its not working eather...
i tryed whith following in my Root web.config (not that i have any sub cfg's now.
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.sample" type="HelloWorldHandler,HelloWorldHandler"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
And whith:
<add verb="*" path="*.sample" type="HelloWorldHandler,HelloWorldHandler"/>
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'HelloWorldHandler' or one of its dependencies. The system cannot find the file specified.
=== Pre-bind state information ===
LOG: User = vexis\vexi
LOG: DisplayName = HelloWorldHandler
(Partial)
LOG: Appbase = file:LOG: Initial PrivatePath = C:\Users\vexi\Documents\webs\vxm\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\vexi\Documents\webs\vxm\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
i can see its trying to get the assimbly from my local web dir but WWD dont create a folder named bin whith the compiled code so im kind of lost for what to do now?
Help appreciated
Salomon B. Sumbundu
Denmark
|
|
|
|