|
Sorry but i think you can't do that as Session is store at server side
you are accessing the aaplication from the URL
Why don't you use query string instead of session varaibles to retrive the data.
As per my understanding there is one application that have one url
After user enters into website Server side session are get created and store
Using this Session values data is coming in Datagrid .
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I am using SSL to crate Https page,
But Security Report Icon shows only for short duration in Internet Explorer ,
and when page downloading complete it is disappear,
Why it is happening?....
i learner
|
|
|
|
|
Hi,
I am the below code to identify the Current loggedIn User. It is working fine, while running with Visual Studio IDE.
Object objLogonUser = Request.ServerVariables["LOGON_USER"];
Web.config --> Windows authentication
After deploying into IIS, it won't give the Current User Id, intead it gives empty. I am trying to solve this by,
IIS --> Website -->DirectorySecurity --> Annonymous access and authentication control / EDIT --> Unchecked Annonymous access & Checked Integrated Windows Authentication.
But, still it doesn't works for me. Can anyone help me in this regard? Thanks
Regards,
Jay
|
|
|
|
|
I'm not quite sure how your managing your security, but you can manage it via your web.config for the most part.
In any event, this might be of some use since you are using .Net.
Response.Write(User.Identity.Name.ToString())
Which on my local machine returns: "COMPUTER_NAME\David"
|
|
|
|
|
Hi friend
i have two page
1.loginpage
2.viewpage
if i give correct username,password,it will go viewpage(it is working fine)
then i give logout in viewpage.it will redirect to loginpage(it is working fine)
now i give navigate to BACK button.it will not go viewpage
how can i achieve this??
|
|
|
|
|
Store the login details in the session. Remove them when someone logs out. Write a base page which checks the session and redirects to the login page if a user is not logged in.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have a datalist template hyperlink..if i click on tat i have to pass a query string to the response page...
how can i do tat??
\plz help me out.
|
|
|
|
|
Hi,
Is the query string is a static one or dynamic?
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
dynamic one...for eg if im displaying a user name n password in the datalist i have to pass userid as querystring of the corresponding selected username
|
|
|
|
|
Dear all,
I am wirting an ASP.NET with VB. In my web form, there are a DataGrid which is contained Edit and Update function. But I found that I cannot update my data during testing. Could anyone tell me how to solve this problem.
Thanks and regards.
JosephWONG
Finally, I hope my message can assist or takle your problem.
God Bless You!
|
|
|
|
|
Hi,
Can you tell us where exactly r u getting problem?
Your update query is not getting executed or your vb code is not getting executed or your data is not getting updated in your database or r u getting any exception?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Dear Chetan Ranpariya,
I don't know that Why the data is not getting update in my database, and I have try to use other database to connect with my code, but it's works.
Could you tell me how can I let you know all of my code & database for your modification.
Thanks & regards.
JosephWONG
Finally, I hope my message can assist or takle your problem.
God Bless You!
|
|
|
|
|
What Database you connected with your project and in that did you execute the Query on the database?
Regards,
Satips.
|
|
|
|
|
Dear Satips,
I am using Access Database connected my project. I can execute the Quey on the database.
Please tell me what can I do to solve the problem.
Regards and Thanks.
JosephWONG
|
|
|
|
|
Check your Connection String? Because that may also have problem?
Regards,
Satips.
|
|
|
|
|
Dear Satips,
I have checked the Connection String, it's correct!
Thanks & Regards
JosephWONG
|
|
|
|
|
Let paste the Code we will check it out.
Regards,
Satips.
|
|
|
|
|
Dear Satips,
The code is shown as follow, and the database is MS Access.
<% @ Page Language="VB" Debug="True" %>
<% @ Import Namespace="System.Data" %>
<% @ Import Namespace="System.Data.OleDb" %>
<HTML>
<BODY>
<Form Runat="Server">
<asp:DataGrid id="dgQuesManage" runat="Server" HeaderStyle-BackColor="#CCFF00"
CellPadding="2" CellSpacing="2" DataKeyField="no"
onEditCommand="Edit"
onUpdateCommand="Update"
onCancelCommand="Cancel"
AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="no" HeaderText="Question No" ReadOnly="True"/>
<asp:BoundColumn DataField="cid" HeaderText="Subject ID" ReadOnly="True"/>
<asp:BoundColumn DataField="stem" HeaderText="Question"/>
<asp:EditCommandColumn HeaderText="Edit" ItemStyle-Wrap="False"
EditText="Edit" UpdateText="Update" CancelText="Cancel"/>
</Columns>
</asp:DataGrid>
</Form>
</BODY>
</HTML>
<Script Language="VB" Runat="Server">
Sub Page_Load(Sender As Object, e As EventArgs)
If Not IsPostBack Then
open_db
End If
End Sub
Sub open_db()
Dim dbProvider As String="provider=Microsoft.Jet.OLEDB.4.0; data source=C:\Inetpub\wwwroot\Test\quiz2.mdb"
Dim con As New OleDbConnection(dbProvider )
Dim strSQL As String
Dim objDataAdapter As OleDbDataAdapter
Dim objDataSet As DataSet
con.Open()
strSQL = "Select * from itembank "
objDataAdapter = New OleDbDataAdapter(strSQL, con)
objDataSet = New DataSet()
objDataAdapter.Fill(objDataSet, "itembank")
dgQuesManage.DataSource=objDataSet.Tables("itembank").DefaultView
dgQuesManage.DataBind()
con.Close()
End Sub
Sub Edit(Sender As Object, e As DataGridCommandEventArgs)
dgQuesManage.EditItemIndex=e.Item.ItemIndex
open_db()
End Sub
Sub Update(Sender As Object, e As DataGridCommandEventArgs)
Dim dbProvider As String="provider=Microsoft.Jet.OLEDB.4.0; data source=C:\Inetpub\wwwroot\Test\quiz2.mdb"
Dim con As New OleDbConnection(dbProvider )
Dim strUpdateSQL, str1, no_str As String
con.Open()
Dim t1 As TextBox
t1=e.Item.Cells(2).Controls(0)
no_str=dgQuesManage.DataKeys(e.Item.ItemIndex)
str1="Set stem='" & t1.Text &"' Where no='" & no_str & "'"
strUpdateSQL="Update itembank " & str1
Dim objCommand As New OleDbCommand(strUpdateSQL, con)
objCommand.ExecuteNonQuery()
con.Close()
dgQuesManage.EditItemIndex=-1
open_db()
End Sub
Sub Cancel(Sender As Object, e As DataGridCommandEventArgs)
dgQuesManage.EditItemIndex=-1
open_db()
End Sub
</Script>
Thanks and regards.
JosephWONG
|
|
|
|
|
In the code there is no error it should work fine.
Regards,
Satips.
|
|
|
|
|
Dear Satips,
Before I post my code for you, I guess the code is correct! Actually I cannot store or update the data into the database. I don't know how to do????
Thanks for your assistance so much.
JosephWONG
|
|
|
|
|
Did you wrote the class for the Insert,Update, Edit and Delete and did you execute that class?
Regards,
Satips.
|
|
|
|
|
Dear Satips,
I have only wrote a class for Update, and have been tested by my friend, they replied that the class was fine and works.
Thanks a lot of assistance.
Regards
JosephWONG
Finally, I hope my message can assist or takle your problem.
God Bless You!
|
|
|
|
|
Dear Satips,
I have only wrote a class for Update, and have been tested by my friend, they replied that the class was fine and works.
Thanks a lot of assistance.
Regards
JosephWONG
Finally, I hope my message can assist or takle your problem.
God Bless You!
|
|
|
|
|
Hi All,
I am getting the following error when i am trying to execute my asp code:
aspSmartUpload error '800a0009'
Subscript out of range
/seba/marketing/updatejobs.asp, line 29
The code at Line 29 is:
mySmartUpload.Upload
Can anyone tell me what and where is the problem.
Thanks.
Anurag Gandhi.
|
|
|
|
|
This is the ASP.NET forum, try the web development forum for asp questions.
There's obviously no subscript there, looks like you're calling a component and it is what's blowing up.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|