|
I am having 3 pages in my application
from page1 by clicking button i am navigating to page3 while page_load of page3 i need to get the previos page URL that is here page1's URL.
can any body help in this secnario,
regards,
Subbu.
|
|
|
|
|
Get it from the Request.UrlReferrer property.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ok, I switched my code as follows:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
Public Sub Page_Load(Source As Object, E As EventArgs)
If Not Page.IsPostBack Then
BindData()
End If
End Sub
Public Sub DataGrid_Edit(ByVal Source As Object, _
ByVal E As DataGridCommandEventArgs)
myInfo.EditItemIndex = E.Item.ItemIndex
BindData()
End Sub
Public Sub DataGrid_Cancel(ByVal Source As Object, _
ByVal E As DataGridCommandEventArgs)
myInfo.EditItemIndex = -1
BindData()
End Sub
Public Sub DataGrid_Update(ByVal Source As Object, _
ByVal E As DataGridCommandEventArgs)
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim txtmyNewCol1 As TextBox = E.Item.Cells(1).Controls(0)
Dim txtmyNewCol2 As TextBox = E.Item.Cells(2).Controls(0)
Dim strUpdateStmt As String
strUpdateStmt = "UPDATE ToddsTable1 SET " & _
"myNewCol1 = '" & txtmyNewCol1.Text & "', " & _
"myNewcol2 = '" & txtmyNewCol2.Text & "' "
myConnection = New SqlConnection( _
"server=SQLSERVER;database=upsizedCandidate;Integrated Security=True;")
myCommand = New SqlCommand(strUpdateStmt, myConnection)
myConnection.Open()
myCommand.ExecuteNonQuery()
myInfo.EditItemIndex = -1
BindData()
End Sub
Public Sub BindData()
Dim myDataSet As New DataSet
Dim mySqlDataAdapter As SqlDataAdapter
mySqlDataAdapter = New SqlDataAdapter( _
"SELECT * FROM ToddsTable1", _
"server=SQLSERVER;database=upsizedCandidate;Integrated Security=True")
mySqlDataAdapter.Fill(myDataSet, "ToddsTable1")
myInfo.DataSource = myDataSet.Tables("ToddsTable1")
myInfo.DataBind()
End Sub
Editing ToddsTable1 from SQL Server
<asp:datagrid id="myInfo" runat="server"
="" autogeneratecolumns="False" oneditcommand="DataGrid_Edit" width="702px" oncancelcommand="DataGrid_Cancel" onupdatecommand="DataGrid_Update">
<columns>
<asp:editcommandcolumn
canceltext="Cancel"
="" edittext="Edit" updatetext="Update">
<asp:boundcolumn
datafield="myNewCol1"
="" headertext="myNewCol1">
<asp:boundcolumn
datafield="myNewCol2"
="" headertext="myNewCol2">
Everything works fine except when I click"Edit" then edit the text and click "update" it changes every cell in the column to the value I entered in the edited column. Any thoughts on how I could fix this?
|
|
|
|
|
Public Function CePerfMeas1_data(ByVal cost_type1 As String, ByVal cost_type2 As String, ByVal view_type As String, ByVal main_fdate As Date, ByVal main_tdate As Date) As DataTable
Dim CePerfMeas1 As String
Dim dbcomm As OleDb.OleDbCommand
Do
CePerfMeas1 = "select sum(CST_TYP_AMT), CST_TYP_DT from IEIT002_CONTESTM where cost_type = " & cost_type1 & " and project no = ( select project no from IEIT002_CONTESTM where cost_type = " & cost_type2 & " and cost_date between " & beg_date & " and " & end_date & " ) "
dbcomm = New OleDb.OleDbCommand(CePerfMeas1, conn)
Dim da As New OleDb.OleDbDataAdapter(dbcomm)
Dim Ds_CePM1 As New DataTable()
da.Fill(Ds_CePM1)
While (main_fdate <= main_tdate)
beg_date = main_fdate
end_date = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, main_fdate))
End While
main_fdate = DateAdd(DateInterval.Month, 1, main_fdate)
Loop
Return Ds_CePM1
End Function
|
|
|
|
|
So wat exaclty is the point of this message you started?
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Another idiotic post, well done.
|
|
|
|
|
using gridview to display information in the tablefrom selected starting date and ending date
please help me with the code for this
oga m
|
|
|
|
|
hi everybody
i want to know how to convert excel sheet to database table (sqlserver database)
Thanks
|
|
|
|
|
For SQL-Server 2000 I normally use a DTS package. For 2005 you can use SSIS.
Alternatively, you should be able to use the OpenRowSet function.
Details of each can be found in Books-Online.
|
|
|
|
|
Create the table with the required columns, and then use sql server import data to import your data from excel to the table you created.
|
|
|
|
|
Youn can use DTS control ( Import and Export data ) ... Goodluck...
NIIT
|
|
|
|
|
Hi,
I need to show a tooltip on Radgrid Hyperlink on mouseover/Mouseout event.
Is it possible to get tooltip for Hyperlink in radgrid.
Please give sugestions
thanks in Advance,
cheers
sangeet
|
|
|
|
|
Set the message in tooltip properties of control properties
Sujit
|
|
|
|
|
hi,
pls help me to find a solution
I have implemented ajax timer in my project,but when we run the app,if we try to access the internet options from tools menu ,the timer event stops from triggering ,then gets back to the same time.So it fails to maintain the time.
so wht could be a better solution,disabling the tool bars or anything else?
pls help
regards
|
|
|
|
|
hi i want dumps in webapplication with C# 2005 ,pls send me
my email id is christo83@gmail.com
|
|
|
|
|
Put it on your xmas list, and see if dumps are delivered
|
|
|
|
|
how to disable a potion without getting selected in the dropdownlist.
Pradeep Reddy
|
|
|
|
|
Wat portion? Please elaborate
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
|
Hello there
I'm having trouble getting started with asp.I've installed the IIS server ok.
i have an incomplete web app in .aspx which i put in the wwwroot folder ,i go to the properties and make it run like an application ..Cool
I choose let's say the Login.aspx and i click BROWSE and i get in mozzilla something like
-2362632 x00e83 or something.what is this????
i then try to open the solution from Visual Studio.Net and i get that "the server doesn't run asp 1.1"
but i have the .net framework1.1 installed and the 1.2 also
in another words what i have to do to finally run asp.net pages on my IIS???
Any advice would be really helpfull, my proggraming expierience is limited to php
PS:the SQL Server 2000 won't run on XP?
Thanks P.
|
|
|
|
|
Hii,
Open Visual studio Command editor(Start->All Programs->Microsoft Visual Studio .NET 2003-->Visual Studio .NET Tools-->Visual Studio .NET 2003 Command Prompt
and run command: aspnet_regiis -i
enjoy..........
Regards,
Sandeep Kumar.V
|
|
|
|
|
i am using a wizard control in a master page it is not working properly.
Shaki
|
|
|
|
|
That's a shame.....care to share anything more, or are we playing a guessing game here?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
What you tried with WIzard control and what error it shows while using this wizard control.
Pls be specific here while posting the question so that only we can help you in solving the problem.
Regards,
Satips.
|
|
|
|
|
hi sorry for not giving the details.......
i am using a Wizard control in master page, I use this.ID = "Master1";
in order to avoid the problem of displaying Menu control in the master.
if i use this.ID = "Master1" in my master page my wizard is not navigating....
Any Solution.........
|
|
|
|