|
is there any source for building a calendar like outlook calendar in vb.net, you can input a link or button in each date, and when you click it, it will open another window. any idea?
Lisa
|
|
|
|
|
I'm stumbling (yet again) and I need some help.
Here is the background/what I want to accomplish:
1) VB.NET project
2) Default page has a number of buttons which redirect to their respective URL's
One in particular I would like NOT to be visible unless specific users (AD DNS Admins) are hitting the page. This would need to be authenticated agains either an AD group or a <location path="..."> in my Web.Config file that I have set up so that only the AD DNS Admins 'can' access the page.
3) If the client is a member of the list in the web.config or specific group in AD, the button would then be visible.
How do I go about doing this? I have tried a number of things on the default.aspx.vb page within the Page_Load but to no avail.
Any help is greatly appreciated.
Regards,
- -
KoalaCowboy
|
|
|
|
|
What you're looking for is Role-based Authentication. This is a topic that is much too large to cover in the forums. I suggest picking up any book on ASP.NET to get a better description of what's going on and how to use it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks!
Hopefully this isn't a stupid question, but can I use Role-based Authentication IN CONJUNCTION with Windows Authentication?
This web-app is used on our Intranet for AD DNS information maintanance and administration, so it utilizes AD credentials to authenticate (through a DL).
If I can use Role-based Authentication to make the "UpdateDNS" button visible when the AD DNS Admins access the default page, then that will work. Guess I'll have to dig through my reference book (ASP.NET Unleashed by Stephen Walther).
KoalaCowboy
Knowledge Monger
|
|
|
|
|
Yes. They're completely seperate from each other. Role-based authentication is setup and managed by you. You determine what the roles are and what access each of those roles has. It's up to you to determine which authenitcation provider to use. In your case, it's Windows and AD.
The AD authentication is done by you to determine if this person is who they say they are and if they're part of the Admin group. Based on this, you can setup the users website roles.
Good book, BTW. I have the 2nd edition...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm working on building some foundational controls for my current VB.NET project. I have subclassed System.Windows.Forms.ListView to extend it a bit for our needs. The functionality I'm trying to develop is a listview where the user can select which columns they would like to display (when ListView.View = View.Details). My initial vision for the UI of the "selection" functionality is some modal pop-up form with a checked list box of column names (checked = displayed).
My question is one of architecture. Is it good practice to include a pop-up form as a private member of a subclassed control? Something like:
--------------------------------------------------------------------
Public Class MyListView
Inherits System.Windows.Forms.ListView
Protected Class SelectionPopupForm
Inherits System.Windows.Forms.Form
...
End Class
Public Sub SelectDisplayColumns()
Dim popupForm as New SelectionPopupForm
popupForm.ShowDialog()
...
End Sub
End Class
--------------------------------------------------------------------
Am I going down a good design trail here? Thanks in advance for any input on this.
--
Dave
|
|
|
|
|
I am making an UNO card game and I want to make random numbers from 1 to 10 and with different colors. Now when i draw a card I want that only 2 numbers which are the same color and number can be shown. For example: 3 red (2 times only). How can i make this? I want to make 4 types of colors (Blue, Red, Green and Yellow) I want to make suffled card in the middle so that one can take a card if he doesn't have the same number in the shown cards that will be placed in the middle. Please help me on this one!!
Adrian De Battista
|
|
|
|
|
Create an array of cards, and then go right through the array, using the Random class to generate a random number between 1 and the number of cards. Then swap the item you've counted to with the item at the random position. So the first time, you swap the first card with a random card, the second time you swap the second card with a random card. The order becomes random, but the cards are fixed, that is you have the range of values you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian is correct about making an array of all of your cards, then suffling them. But, there's another method of shuffling that doesn't involve swapping cards. This alternate method is used by the secured shufflers in just about every internet poker site that's honest.
What you'll do is create an array of cards, just like Christian described. Then pick a random card in the deck (1 to 52), remove it from the deck and add it to the top of a new deck, or second array. Now, pick another random card (1 to 51), remove it and add it to the top of the new deck, and so on until you've exhausted the source deck.
You can read more about this research, and why card swapping and a 32-bit RNG can only generate about 4 billion or so decks (assuming 52 cards) out of the possible 8.0658175170943878571660636856404e+67 decks, by Googling for "How we learned to cheat internet poker".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK - thanks for the info. I've used code like this to do shuffle in the past ( C++ offers a random_shuffle method as standard, I wish the .NET standard library would catch up ), but I'll use your method in future.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I found the article link that I read before, here[^]. Seriously, check it out. It's very interesting.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks - it's a slow day, so I'm reading it now...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Slow day? Oh, that's right! It's light outside where you are. It's about 10:00pm here. Just getting ready to sit down to some online Poker...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am trying to get html source as string in javascript. I want that user requests a page from Internet Explorer and when server returns response to browser then instead of displaying html into browser there should be a javascript code which gets all returned html in to a variable as string. I then want to send this string to a web service for further processing. Web service returns html as string and then display this string in browser through javascript. I know how to call web service from javascript but getting html is a problem.
I have been trying to find a way for the last 4 weeks but no success. Please let me know if someone knows how to do that. Its too urgent!
|
|
|
|
|
though this is not the ASP or JavaScript forum but here is the solution for your problem
in the form load event create a string which you want to use in javaScript
and do this
response.write "" & vbcrlf
response.write "var x" & vbcrlf
response.write "x=" & VariableName containing HTML text & VBCRLF
response.write "" & vbcrlf
now this x variable can be accessed in JavaScript and you can do what ever you want from here onwards
|
|
|
|
|
Thanks alot for replying. I might not be clear in describing th problem. Actual problem is that i have few websites. Now i want to add a line like <script language="javascript" src="somelocation></script> in the header of every website. This script will get all the html that will be generated by the server. Instead of displaying in browser our script will hack that html. Browser will hangup and will not display anything.
For example i add script in http://www.website.com header. User types in http://www.website.com in his browser. Now when server sends html to display in browser my script should get all html and pass that html to web service.
Can we do it in javascript? Thanks again.
|
|
|
|
|
hmmm.. big problem.. well I am not sure you can do this or not. So if you find any solution do let us know about this.
best of luck
|
|
|
|
|
If only it was that simple...
What you're proposing is possible to do, but not with a simple script like that. Since the script you're proposing will not execute until the HTML you want to capture actually gets to the browser and is pre-rendered, your script will either have to retrieve the current document from the browser, or have to make a SECOND call to the server to retrieve the same page it's running on. Then you can send that to your web service, get back the altered page, then replace the current document source with the altered document source.
But, you'll end up with flickering pages in all your web sites as each page is loaded and rendered TWICE!
No, I don't have any sample code, nor do I know of any.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Could you please let me know that how can we hide current document loading. I just retrieve the response url from browser and feed it to my web service. I want that page loads in browser but does not display in browser. I tried it whole day today but unfortunately i am beginner to javascript. Any guidance will be appreciated.
Regards,
Ahmad.
|
|
|
|
|
Like I told you, the page will display, and then refresh when the javascript changes to the new page from the webservice. You cannot stop the page from rendering because the javascript doesn't start running until the page starts rendering. You can't stop it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All
I am developing a system that will retrieve information from pastel account information, it will have to retrieve the invoice number and store it in the SQL server database so I need help on how to connect to pastel so that I can be able to get the information from pastel and from the database to pastel. The two applications have to share some sort of information. The help that is provided must be in visual basic 6.0 because that is the one I am using.
Hope you can help
Thank in advanced
|
|
|
|
|
I can't help, I don't use VB6. But I have no idea what pastel is, except a pale colour. Perhaps if you explain this, someone else can help you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'll second that question. What on earth is "pastel"?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
it seems to be the name of his server...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Is there any VB.NET control that can help me if i want a figure or table to be inserted in the database? Which control i should use?
Actually i want to insert tables and other images from word document into my database and dont know what to do. Please help me in this regard.
Thanx in advance.
Arfan Qadir.
|
|
|
|