|
well ..., I guess it does.
100
Help people,so poeple can help you.
|
|
|
|
|
Hi guys,
I have explained my probs here..,
this problem is occuring in IE browser only...,Mozila its working fine...,
Plz click on the following url in IE browser
http://www.justtrade.in/Portfoliotracker/Default.aspx
U will see "Registered User" link plz click tht one..., u will get a login page, with out changing the browser url...,becoz its opening in an iframe...,
so, the login page also in an iframe...,
here if i am trying to login a user...,if the user is authenticated...,
i am using his user name as session...,and redirecting him to home page...,
but, if the valid user login also, its redirecting him to login page only...,
this problem in IE browser only...,Mozila its working fine...,
can u plz tell me y its not working in IE? and how to solve this one?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
guys, you know the function 'Page_Validate('validationgroup') ' we use to validate controls?
I need the opposite of it (e.i. hide all validators within a certain group.
waiting for your replays;
Help people,so poeple can help you.
|
|
|
|
|
That method does not exist. You will have to code one yourself.
|
|
|
|
|
Why!!? .... !!!
Help people,so poeple can help you.
|
|
|
|
|
Because not all methods exist and there is no business requirements which would require to do this in most applications. If everything would exist we wouldn't need sites like codeproject or developers like me and you.
You could also argue that it's the fault of Bill Gates, Steve Jobs, Google, Obama, Paris Hilton, Lady Gaga, Einstein or the creators of South Park, but I doubt they'll care...
|
|
|
|
|
JV9999 wrote: there is no business requirements which would require to do this in most applications.
For certain values of most.
My Boss' Boss wanted all these fields to be required, but also wanted to let the user "save for later", i.e. submit the data without finalizing the submission.
Would be nice to be able to just turn off the validation in one swell foop in cases like that.
..and water fell from the sky like rain.
|
|
|
|
|
That's gonna be a problem with a maxlength validation when you entered 50 characters and the database only allows 20... So even in that case you should validate before partially saving.
|
|
|
|
|
Or maxlength the textboxes, etc.
I hate web apps.
"We need a web application for this."
"How many users are there going to be?"
"Three"
..and water fell from the sky like rain.
|
|
|
|
|
GenJerDan wrote: I hate web apps
It seems you just don't understand the capabilities. That isn't a reason to "hate" it. Its a reason to learn it.
I know the language. I've read a book. - _Madmatt
modified on Wednesday, February 23, 2011 9:50 PM
|
|
|
|
|
hey Mark...!! ;
how are you doing?
100 , man.
Help people,so poeple can help you.
|
|
|
|
|
Sir, I was trying to play the whole game on the client court
e.g.
when adding a 'Bank' we may want to add its 'Bank Branch'es before submition(before inserting the 'Bank' to the database). so we store them in a hidden field. that is why i need to hide validators.
100
Help people,so poeple can help you.
|
|
|
|
|
Then you could change the validation code. Add a Boolean "ValidateLater", and depending on that perform proper validation or just return true.
But of course with the max length issue of some fields etc, you would have to store the data in some other place than the normal database.
|
|
|
|
|
Dunno if this is what you want however disable validator function exists.
ValidatorEnable(val, enable)
Takes a client-validator and a Boolean value. Enables or disables a client validator. Being disabled will stop it from evaluating and it will always appear valid.
val = document.getElementById(validatorid);
ValidatorEnable(val, false);
|
|
|
|
|
Sir, How about this:
function hideValidators(group){
for ( var i = 0; i < Page_ValidationSummaries.length; i++ ){
if (Page_ValidationSummaries[i].validationGroup == group)
Page_ValidationSummaries[i].style.display = 'none';
}
for ( var i = 0; i < Page_Validators.length; i++ ){
if (Page_Validators[i].validationGroup == group)
Page_Validators[i].style.visipility= 'hidden';
}
}
100 , ya man;
Help people,so poeple can help you.
|
|
|
|
|
Hi everyone
I developed a Windows Application for the cancer department I am working in. It is a registry of all the patients that we see in the department and the doctors use it for stats and research. Patients are entered and edited in the system. There is also a reports system where users can create their own custom reports and safe the report parameters for future use.
I have done the user accounts such that a user can belong to more that one group. So a user might belong to the ‘Patients Admin’ group, the 'Data Admin' group and to the ‘Reports Admin’ group. Another user might belong to the ‘Patient Edit’ group and ‘Reports Admin’ group. A third user might only belong to the ‘Patient Open’ group. Thus depending on the group they belong to they can access certain areas and forms are only allowed certain actions. In other words some users might be able to access a screen/form to view the information, but cannot edit the information.
I am using a SQL Server 2008 Express database as the back-end. The user accounts (usernames and hashed passwords) and the Group details and Permissions details are also stored in the same database.
The structure is like the following:
CREATE TABLE [dbo].[Groups1]
(
[GID] [int] NOT NULL
PRIMARY KEY CLUSTERED,
[GroupName] [nvarchar](50) NOT NULL,
[Description] [nvarchar](150) NULL
)
CREATE TABLE [dbo].[Permissions1]
(
[PID] [int] NOT NULL
PRIMARY KEY CLUSTERED,
[Permission] [nvarchar](50) NOT NULL,
[Description] [nvarchar](150) NULL
)
CREATE TABLE [dbo].[Users1]
(
[UsID] [int] NOT NULL
PRIMARY KEY CLUSTERED,
[Username] [nvarchar](50) NOT NULL,
[UPassword] [nvarchar](50) NOT NULL
)
CREATE TABLE [dbo].[GroupPermissions1](
[GPID] [int] NOT NULL,
[FK_GID] [int] NOT NULL
FOREIGN KEY
REFERENCES Groups1 (GID),
[FK_PID] [int] NOT NULL
FOREIGN KEY
REFERENCES Permissions1 (PID)
)
CREATE TABLE [dbo].[UserGroups1]
(
[UGID] [int] NOT NULL,
[FK_UID] [int] NOT NULL
FOREIGN KEY
REFERENCES Users1 (UsID),
[FK_GID] [int] NOT NULL
FOREIGN KEY
REFERENCES Groups1 (GID)
)
I was asked to convert this Windows application to a Web application. Due to confidentiality issues regarding patient details I need to do authentication and authorization.
Is it possible to use this type of group and permissions structure in a web application?
If it is possible the next question is then how easy will it be implement the built-in login controls from ASP.NET with the user accounts, groups, and permissions in my custom database?
Kind regards.
Kobus
modified on Tuesday, February 22, 2011 6:28 AM
|
|
|
|
|
|
The good news is, you can do exactly what you are doing now. Porting your application to the web does not impede your ability to query your database for the users' roles and permissions and provide access to the page only if they meet the criteria they would have needed in a Windows application. There are excellent tools in the built-in asp.net membership providers as someone else has posted, but you can also do it just like you are doing now and not have to re-write that part of your code. I work in a web-based environment where we use exactly that sort of thing--roles and permissions and actions linked in SQL2008 tables. Works fine. If you do switch to the built-in role and membership providers in ASP.Net, you will gain some advantages because you can simply check the value of methods like UserIsInRole or IsLoggedIn and so forth, but you can also port your Windows Forms code to check these in the page load event, and redirect them to a page telling them they can't play there if they don't belong.
I hope this helps, and good luck with your application.
Lisa Z. Morgan
|
|
|
|
|
It makes sense that in the Page class, there are certain methods where the Page subscribes to the above Control class' events, for example:
this.PreRender += new EventHandler(Page_PreRender);
This is because, without the programmer writing this, you declare a method in Page class as follows:
protected void Page_Load(object sender, EventArgs e) {...}
protected void Page_PreRender(object sender, EventArgs e) {...}
and it automatically is invoked during the Load and PreRender events respectively. How do I determine which methods in Page class the subscription to the events are made? I don't think there is necessarily just 1 method where all the events are subscribed to.
The reason I am asking is so that if I needed to subscribe to any of these events in my Page derived custom pages, I can place them properly.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
Try to dig down the AutoEventWireup attribute of the page directive and its use....you will be able to understand how the default events gets wired up with the event handler.
|
|
|
|
|
How can I create a UserControl with a collection-type property which has a collection editor?
I've a CompositeControl with an ArrayList-type property which has CollectionEditor-type designer. You can see this property on Properties window with a "..." button which launches a collection editor. This works fine and all but I want to apply the same to a UserControl and I've couldn't manage to pull it off so far. I've done the same thing what I've done with my CompositeControl but the property either doesn't even show on Properties window of the UserControl or shows as a single value property with no "..." editor button.
This is what I've done with CompositeControl:
[
DefaultProperty("Contacts"),
ParseChildren(true, "Contacts"),
ToolboxData(
"<{0}:QuickContacts runat=\"server\"> </{0}:QuickContacts>")
]
public class QuickContacts : CompositeControl
{
private ArrayList contactsList;
[
DesignerSerializationVisibility(
DesignerSerializationVisibility.Content),
Editor(typeof(ContactCollectionEditor), typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)
]
public ArrayList Contacts
{
get
{
if (contactsList == null)
{
contactsList = new ArrayList();
}
return contactsList;
}
}
|
|
|
|
|
Sir, I am not an expert but i think you can use the ViewState object.
Help people,so poeple can help you.
|
|
|
|
|
hello,
i have been using using Microsoft.Office.Interop.Word in my webserver (yes, i know it is not recommended)
when i ran it on my machine it runs fine but when running on the server i get time out on the line:
Documents.Open //when trying to open the file.
is there something im missing?
is there a better way to edit word document within web servers/ websites? (i can't create a new one using string builder or outputting into file i need to edit an existing one that sits on the server)
any input will be appreciated as I'm stuck on this for few days already...
thanks
btw – I posted it on the c# page by accident so sorry if you have to read this twice
|
|
|
|
|
Hi All,
I have a .aspx page like the code given below.
My question is can I identify the controls in the code behind.
i.e in my code behind it should identify like, i have one textbox and checkbox.
Please suggest me some idea....
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<title>
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
You can iterate through the controls in the page's Control Collection.
Some ideas here: Dynamic Controls[^]
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
modified on Sunday, February 20, 2011 9:59 PM
|
|
|
|