|
Is that possible? I mean, I have this project written in ASP, and it does some common tasks (log in, etc) and then it calls some pages in ASP.NET. In particular, the ASP page saves the logged user into the Session object. Now I'm trying to access it from the ASP.NET page, but Session.Count is returning a big round zero. What I'm up to, is it possible to do? If not, how can I do it?
Thanks in advance.
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
To do something like this, you need an intermediate object, probably a windows service, in to which you can stuff the asp session and then pull it out again on the ASP.NET side.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Mmm... I see. I guess I could send a QueryString from the ASP into an ASPX and in such, I will add it to the Session object. That would be alright, wouldn't it?
Thanks!
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
Yes, so long as the data is not secure, that is going to work just fine.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Chris,
Sorry for interrupting...
You said that we an use Windows Service for share the Session objects. What kind of Windows Service? Is it a in-built one or we have to write a one?
|
|
|
|
|
There's nothing built in. I wrote one for an ASP.NET 1.0 page, a long time ago. I'd be surprised if google didn't turn any up, it wasn't that complex.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Writing Windows Service and running it would be fine if we own the Web Server. What about the person who deploys in shared web servers.
|
|
|
|
|
After logon in the Master page, am showing tree node using the following.
if (HttpContext.Current.User.IsInRole("abc"))
{ Show tree node }
This works fine.
I have a Impersonate.aspx page where I make the user enter the user id on the textbox and associate it with Global.asax.cs I have this.
public static string CurrentUser
{
get
{
if (_currUser == string.Empty)
return SignedOnUser;
else
return _currUser;
}
set { _currUser = value; }
}
I have to get the CurrentUser value when I use HttpContext.Current.User.IsInRole()
Am I taking the right approach? Please help.
Thanks
|
|
|
|
|
Hi,
I really need help
I have a page designed in ASP.net over VB
it is an evaluation form :
20 questions for each there must be five choices (excellent, veryGood, Good, week, bad)
the questions are stored in the database (SQL)and retrieved once the page loaded, I had added 5 radio buttons to the gridview as template Item
AS FOLLOWS:
<asp:templatefield headertext="ansewrs">
<itemstyle width="230px">
<itemtemplate>
<asp:radiobutton id="btn5" runat="server" groupname="answer">Text="excellent" />
<asp:radiobutton id="btn4" runat="server" groupname="answer">Text="veryGood" />
<asp:radiobutton id="btn3" runat="server" groupname="answer">Text="good" />
<asp:radiobutton id="btn2" runat="server" groupname="answer">Text="week" />
<asp:radiobutton id="btn1" runat="server" groupname="answer">Text="bad" />
But how can I retrieve the answers of each question when a button is clicked
I really need to know and I will do any thing
another ideas are accepted
There is always something to learn
modified on Thursday, December 20, 2007 4:01:01 PM
|
|
|
|
|
|
thaaaaaaaaaaaank u very much it helped
There is always something to learn
|
|
|
|
|
Hello everybody,
I should create an application through wich a user could schedule the execution of an asp page. I'm tryng to understand how to schedule jobs in Windows Scheduled Tasks, using an asp script.
I'm using Windows 2003 SP1 and IIS 6.0
At first I had tried to use WScript.Shell and run
schtasks /create /tn prova /tr 'pagina.asp' " & _
"/sc once /st 09:55:00 /sd 23/11/2007 /ru username /rp password
but I couldn't go on because of permissions' lack.
Suddenly I've tried to use WbemScripting.SWbemLocator in this way:
1. Set Locator = Server.CreateObject("WbemScripting.SWbemLocator")
2. Locator.security_.impersonationLevel = 3
3. Set wmiNameSpace = Locator.ConnectServer (computername, "root\cimv2", username, password)
4. Set Wcls = Service.Get("Win32_ScheduledJob")
Doing this, I received a Denied Access message on type bar 3
Then I've tried to use this:
1. strComputer = "."
2. Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
3. Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
But I get a Denied Access message on type bar 2
I would like to know if is the right way to create and schedule jobs, and how could I solve this problem
I apologize for my english.
Thanks
|
|
|
|
|
rspadar wrote: I received a Denied Access message
Well that should give you a clue. You shouldn't attempt to do this from a webbrowser. Why would you want to allow users to schedule tasks on your server? Where are the username and password coming from?
only two letters away from being an asset
|
|
|
|
|
I recommend using a DTS Package to do this. You can schedule the DTS package just like you would with a Windows Task, and you can call it from the ASP page. A lot easier to work with.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
|
Don't cross post
only two letters away from being an asset
|
|
|
|
|
Don't cross post. It's just plain rude.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hello EveryBody
SQL SERVER Database
Table1: dbo.Authors (AuthorsID(PK), AuthorsName)
Table2: dbo.Books (ISBN(PK), BookTitle)
Table3: dbo.BooksAuthors (AutoID, ISBN(FK), AuthorsID(FK))
On my ASPX page
I have txtISBN and ddlAuthorsName and a btnSubmit
What I want to is,
On ddlAuthorsName Selected Index Changed I want to show a gvBooksAuthors.
Data will be ISBN and AuthorsName
*** If I select 3 diffrent AuthorsName then It will be appear on gvBooksAuthors
*** And when I clicked btnSubmit then dbo.BooksAuthors will add 3 rows like
AutoID ISBN AuthorsID
1 1001 101
2 1001 102
3 1001 103
Any Instruction will be really helpful
Thanks in Advance
Sarfarj Ahmed
|
|
|
|
|
Sounds like a homework assignment.
You have the author, or their ID, just query your data.
only two letters away from being an asset
|
|
|
|
|
I don't think a drop down list is the right control if you want to be able to select more than one author ? Is this what your teacher specifically asked you to do ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
one book can be written by many authors
so, how will i add multiple authors for a single book
for example,
Book Title: ASP.NET 2.0 Authors: David Cameron. George Bush. Tony Blair. Gordon Brown
this book has been written by 4 authors, so how will i add this 4 authors for asp.net 2.0 book?
Sarfarj Ahmed
|
|
|
|
|
i am using grid view control in my project
i have set autogeneratecolumns false and added columns
like this
<Columns><br />
<asp:TemplateField HeaderText="User Name" SortExpression="UserName"><br />
<ItemTemplate><br />
<%#Eval("UserName")%><br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign = "Left" /><br />
</asp:TemplateField><br />
<asp:TemplateField HeaderText="Voice Id"><br />
<ItemTemplate><br />
<a href="javascript:DispalyError('<%#Eval("vid")%>','<%#Eval("UserType") %>')" title="<%#Eval("VoiceId")%>"> <%# Eval("VoiceId") %> </a><br />
<br />
</ItemTemplate><br />
<ItemStyle HorizontalAlign="Left" /><br />
</asp:TemplateField>
(more columns)
now i want to have sorting property for all columns in the grid can any body please tell me how to do this
regards
sunilwise
|
|
|
|
|
If you turn on the sorting functionality of the grid view, it will render the headers as links, but you will still need to handle the event that is fired, and write the code to sort your data.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir can you please tell me in detail how to handle the event
|
|
|
|
|
I have an image in the form of byte array and i have to display it as Htmlimage.
I ve tried in google. I got some results ragarding converting the image into System.drawing.image
Can any body post some links or info. to convert a byte array into html image?
--Sreeram
|
|
|
|