|
Hi ,
i make administration web page to my site where i make permissions to all users but in the page level i want to control in some contents in the page , for example the edit button appear to admin but not appear in normal user .
i know the general idea but i can not do it:
==============================
Then you can identify as part of the Page_Load event on any page whether a user has logged in or not, and what their roles are (administrator, guest etc).
If their role is administrator and you have your 'edit' button as an asp.net control you can make it visible in the Page_Load event.
All the best,
I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that.
--------------------------------
Discover Other ....
http://www.islamHouse.com
|
|
|
|
|
How do you track users at all ? You should do it with some sort of session variables, then you can check that where-ever you are. However, I'd write a class that checks the session and just returns the admin settings. Either as part of a base page, or in a class that the base page contains.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Can i find any article that talk about this ?
I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that.
--------------------------------
Discover Other ....
http://www.islamHouse.com
|
|
|
|
|
I'm sure you can, but I don't know any off hand.
The core question is - how are you tracking who is logged in, and what their permissions are ? Do you store it all in the session, or, do you store an id in the session and use that id to read permissions from the DB ? Either way, you need to write some code that gives you access to that information in the code that decides what gets rendered on your page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i am depend on the membership provider that are ready in 2005
I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that.
--------------------------------
Discover Other ....
http://www.islamHouse.com
|
|
|
|
|
OK - then you need to work out how that works, or what it gives you to work out membership and see how you can integrate that so you can access it across your site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Example:-
i have citypage(aspx) in that one label(city ID) and textbox,i have another aspx page(customer page)i want reuse city page control(label,textbox) in customer page and when control will display in customer page,i want to rename label city ID to customer ID.
|
|
|
|
|
You should use your original post instead of creating a new thread everytime.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
You are a retard. Don't post your questons over and over, stick to one thread.
If you want to rename the control, then you need to use a new control. In fact, if all you have is a label and a textbox, the whole question is just plain idiotic. Two controls. Just put them on each form and name them what you want.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have created one page(aspx) in that page there is textbox,label,button.,i want that control(textbox,..,..)on another page(like inheritd from one page(aspx) to another page(aspx))and also i want edit that control on inherited page
|
|
|
|
|
Ignore repost
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have created one page(aspx) in that page there is textbox,label,button.,i want that control(textbox,..,..)on another page(like inheritd from one page(aspx) to another page(aspx))
|
|
|
|
|
You should create a user control [^]instead.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
but i wnt edit that control.
|
|
|
|
|
You appear to be clueless. What do you mean, you want to edit it ? The logical way to get the same group of controls onto two pages, is master pages, or a user control.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
pkj wrote: but i wnt edit that control.
What do you mean by editing the control?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
If you look above, he wants to reuse a couple of controls, BUT he wants to rename them every time. He has absolutely no idea.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: If you look above, he wants to reuse a couple of controls, BUT he wants to rename them every time.
I have an excuse why I am loosing my hairs. All because of these type of supreb questions.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yeah, I know - the fun never stops.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all, I am using some code in vb.net which sends mails from a text file. I need to display count on a label after each mail has sent. I tried in many ways but i never succeeded. i am sending my code please do the need full.
oRead = oFile.OpenText("E:\YAHO0039.txt")
While oRead.Peek <> -1
mailid = oRead.ReadLine()
Dim m As MailMessage
m = New MailMessage
m.From = """Get paid for receiving Emails"" <news@richptr.com>"
m.To = mailid
m.Cc = ""
m.Bcc = ""
m.Subject = "Receive emails and Get Money"
m.Body = TextBox1.Text
m.BodyFormat = System.Web.Mail.MailFormat.Html
SmtpMail.Send(m)
' i need to use the code right here
End While
oRead.Close()
Please help me and send email if you have any idea. sureshsamatham@gmail.com
|
|
|
|
|
sureshsamatham wrote: Receive emails and Get Money
Interesting
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
sureshsamatham wrote: "Receive emails and Get Money"
I am pleased that you're too stupid to make your spam program work.
sureshsamatham wrote: . sureshsamatham@gmail.com
This will get you a lot of spam. Ironic, really.
Also, there's not a single line of code here that is javascript, or that is a counter. So, you don't appear to be making sense.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how create session & what's use of session
|
|
|
|
|
|