|
WHAT IS THE ERROR?
Gautham
|
|
|
|
|
When I try to access HiddenField Id("txtname") in my page i am getting "txtname " is not declared.
Pls tell me
Thanks.
|
|
|
|
|
ok! can you also tell me what is your objective? what exactly you want to do so that we can find out some other solutions too at the same time!
Gautham
|
|
|
|
|
Suppose I have one form with one Hidden Field.Suppose I want the same Hidden Field value in the next page for comparing purpose.see below detailly
Webform1 : 1 Hidden Field.
Webform2 : 1 Html TextBox is there I need to comapre the value of this TextBox with webform1 hiddenField.For this I need to pass the value of the hiddenField to next page.How?Also provide Javascript function I wrote in separate file pls tell me?
Thanks.
|
|
|
|
|
Are you using an asp:HiddenField tag or an input tag with type="hidden"? Do you have a runat="server" property in the tag?
---
single minded; short sighted; long gone;
|
|
|
|
|
simple Html controls.I need all stuff in HTML and Javascript maximum
|
|
|
|
|
What I think the prolem is that you are trying to insert a value in an HTML field from server side scripts which is not possible. Because if you are assigning to the Hidden Field Value from the code means calling server side script to execute.
You can achieve your target using Javascript.
Getting the value of the querystring in any javascript function, assigning this into any varaible and then compare the two values that you want to do.
Hope this will helps you
KHATRI
|
|
|
|
|
Hi to All,
I put DropdownList inside the DataGrid. I want to bind that DropdownList. Values from Database.
When, I select the values on that DropdownList, the values of DataGrid should be change....
Please help me soon,
Mohan balal
|
|
|
|
|
filling the dropdownlist logic should be written inside the datagrid's itemdatabound event!
Now, when you add the dropdownlist in the datagrid give he autopostback property as true for the dropdownlist and then when the selection is changed you have to rebind the datagird according to the value selected in the dropdownlist, this logic would go in the itemcommand event of the datagrid!
Gautham
|
|
|
|
|
Thanks for Your Reply, If you have code or Examples Please Post it
Mohan balal
|
|
|
|
|
Here[^] you can get so many examples for datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi all,
i am using a infragistics web grid control in my asp.net 2003 page(c#).
i need to diaplay the data in the hierarchical structure. i.e ( parent - child- grandchild).
but i am able to display a single hierarchy ( paren - child).
i am not able to implement a grand child hierarchy.
can anyone suggest me the solution for this.
And also i need to implement a hyperlink in my web grid cell to navigate another page when the user click on a particular hyperlink .
Note:
The grid structure is :
---------------------------------
name id Edit
--------------------------
- jhon 1 edit
- michale 2 edit
adam 3 edit
when the user clicks on the edit button(hyperlink) i need to navigate to another page.
|
|
|
|
|
Hi
i had same requirement for that i have developed one custom control. Instead of using inbuild asp control you can develop your own control and can play with it
as you want take a look at it and try to apply your logic
http://www.15seconds.com/Issue/040421.htm
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
I'm creating the webcontrol that has a drop_down.gif image.
The image is a resource in my control.dll.
I have other resources (.js,.css) in my assembly that i read and output to the page in
protected override void Render(HtmlTextWriter output) method.
The only problem i have is to display a image from my resource as i need to insert url of the image and i can only load binary image from resources.
How can i do this ?
The whole requirement is that i will have one simple control.dll that i can add to toolbox and than user just drag&drop it to editor fill the required properties and it should work. (all the scrips and images will be stored in the control.dll)
I know that i can use the IHttpHandler and output the image using
context.Response.OutputStream.Write()<br />
context.Response.ContentType = "image/gif"
This is all fine and it works but it require adding the httphandlers into web.config and I want no editing at all. User simple drag&drop and it should work.
Any idea how to do this ?
Thanx
Edit: Forgot to add this need to work under .Net 1.1
|
|
|
|
|
Hello,
I'm trying to make a single "page patch" to an existing ASP.NET website. All I want to do is comment-out some phone number validation code that I want the app to ignore, and recompile the dll to include this change. I've been told that one way this can be done is to "hotwire" the codebehind page by changing the this line of the .aspx page:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="checkout_main.aspx.vb" Inherits="mywebsite.checkout_main"%>
...so that "Codebehind=" reads "Src=", and so that the project name is stripped out of the inherits, so that "mywebsite.checkout_main" just reads "checkout_main". However, now I get a compilation error when I run the page with these changes:
Server Error in '/' Application.<br />
Compilation Error<br />
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.<br />
<br />
Compiler Error Message: BC30188: Declaration expected.<br />
<br />
Source Error:<br />
<br />
Line 5: Namespace mywebsite<br />
Line 6: <br />
***Line 7: Partial Class checkout_main *** [emphasis mine, this line was marked red by the error page]<br />
Line 8: Inherits System.Web.UI.Page<br />
Line 9: Protected WithEvents loginid As System.Web.UI.WebControls.TextBox
Here is the part of the codebehind page the error seems to be referencing:
Imports System.Data.SqlClient<br />
Imports System.Web.Mail<br />
<br />
Namespace mywebsite<br />
<br />
Partial Class checkout_main<br />
Inherits System.Web.UI.Page<br />
Protected WithEvents loginid As System.Web.UI.WebControls.TextBox<br />
Protected WithEvents password As System.Web.UI.WebControls.TextBox<br />
Protected WithEvents password1 As System.Web.UI.WebControls.TextBox<br />
Protected WithEvents CompareFieldValidator1 As System.Web.UI.WebControls.CompareValidator<br />
Protected WithEvents hint_q As System.Web.UI.WebControls.DropDownList<br />
Protected WithEvents Hint_answeer As System.Web.UI.WebControls.TextBox<br />
Protected WithEvents Salutation As System.Web.UI.WebControls.DropDownList<br />
Dim myconnection As SqlConnection<br />
Dim mycommand As SqlCommand<br />
Dim chk_lib As New main()<br />
Dim retval As String<br />
Dim insertstr As String<br />
Dim b_addr As String<br />
Dim b_city1 As String<br />
Dim b_state1 As String<br />
Dim b_pn As String<br />
Dim ots As String
When I change Src and Inherits back, things work ok, just not with the changes. I must be doing something very simple wrong... any advice would be greatly appreciated.
|
|
|
|
|
I'm trying to determine which approach is the best (realizing that is somewhat subjective).
I have a header/footer for some web pages that can be modified by the client, although rarely. Initial thought (and current implementation) was to read file contents, at application start, into application storage area. Every session start will check file timestamp and reload data if needed (to prevent having to unload application by stopping IIS). However, realizing that the client has trememdously bloated HTML for footer (several 1000 lines), I'm wondering if simply reading the file each time would be more efficient.
What is the general consensus and/or is there a better approach?
|
|
|
|
|
Hi...I'm trying to access the onbeforeunload property of the body tag from a content page. ...Since the body tag is maintained at the Master level, how is it that I go about accessing it? I was hoping that Master.Attributes["onbeforeunload"] would do the trick, but no luck.
-- modified at 16:36 Monday 23rd April, 2007
Welcome my son...Welcome..to the Machine
|
|
|
|
|
In the master page add runat="server" to the body tag and give it some id.
In the content page access it like:
((HtmlGenericControl)Master.FindControl("bodyid")).Attributes["onunload"] = "alert('unloading!')";
|
|
|
|
|
good idea..thanks a lot
Welcome my son...Welcome..to the Machine
|
|
|
|
|
I have a list of IDs(which I get from select ID from tbl_IDs) and have a stored proc which takes this ID and does some function.
I have loaded IDs in a list box and allowed multiple select.
As stored procs dont support arrays to be passed as parameters, I thought that If I run stored proc in a loop and iterate through every value in listbox it should work.
but now the problem is it doesnt work
e.g
for each strID in lstId.selectedvalues
call stored proc and in parameters for stored proc, pass listid.selectedvalue
next
any ideas how to do this.
regards
|
|
|
|
|
drequinox wrote: I thought that If I run stored proc in a loop and iterate through every value in listbox it should work.
Wow - nasty
drequinox wrote: As stored procs dont support arrays to be passed as parameters
You can pass a string which is comma seperated values and chop it up in the proc. Or, you can pass in XML ( this is how I would do it ) and SQL Server can turn an XPath into a table of values which you can then query against.
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 )
|
|
|
|
|
drequinox wrote: but now the problem is it doesnt work
What do you mean by "It doesn't work"?
Does anything happen? Does something happen, but its the wrong thing? What happens when you step through the code with the debugger?
|
|
|
|
|
Many thanks for your reply
This is what I am doing, in debug it stays at the first number which I selected, and dimcellnumber has just first char of listitemvalue in it...
dont know what to do, I think I am little new in it...
regards
dim mobilecellnumber as string
Protected Sub cmdAssignNorth_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If lstMobGroup.SelectedValue Is Nothing Then
Exit Sub
End If
For Each mobileCellnumber In LstNorth.SelectedValue
Dim cmdAssign As New DataSet1TableAdapters.DepotsTableAdapter
retvalue = CType(cmdAssign.sp_MM_AllocateToMobGroup(lstMobGroup.SelectedValue, LstNorth.SelectedValue), Integer)
Next
If retvalue = 1 Then
strStatus = "Success"
labelstat.Visible = True
labelstat.Text = "Operation Succeeded"
labelstat.Text = LstNorth.SelectedValue
ElseIf retvalue = 2 Then
strStatus = "Fail"
labelstat.Visible = True
labelstat.Text = "Operation Failed"
End If
End Sub
|
|
|
|
|
Code behind - .aspx.vb
Partial Class Ce_PerfMeasVW
Inherits System.Web.UI.Page
Dim cetrend_view As String
Dim cetrend_pmeasure As String
Dim cetrend_ptitle As String
Dim objBaseClass As BusinessObjectBase
Dim CePM_BusinessObj As Construction_Bll
Dim p_measure As String()
Dim inf_factor As Boolean
Dim view_type As String
Dim from_dates As String()
Dim to_dates As String()
Dim Dt_CePM As DataTable
Dim dal_obj As Construction_Dal
Dim a As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Page.IsPostBack = False Then
'cetrend_view = Session("view_type")
'cetrend_pmeasure = Session("p_measure")
'cetrend_ptitle = Session("page_title")
cetrend_view = Request.QueryString("v_type").ToString()
cetrend_pmeasure = Request.QueryString("p_meas").ToString()
cetrend_ptitle = Request.QueryString("p_title").ToString()
lbl_ce_perfmeashd.Text = cetrend_ptitle
p_measure = New String() {0, 1}
p_measure = Split(cetrend_pmeasure, ("-"), (-1))
inf_factor = chk_ce_perfmeasinf.Checked
view_type = ddl_ce_perfmeasvw.SelectedItem.Value
If rb_ce_perfmeasmon.Checked Then
objBaseClass = New BusinessObjectBase
from_dates = New String() {0, 1}
from_dates = objBaseClass.get_month_year(ddl_ce_perfmeasyrs1.SelectedItem.Value, ddl_ce_perfmeasmon1.SelectedItem.Value)
to_dates = New String() {0, 1}
to_dates = objBaseClass.get_month_year(ddl_ce_perfmeasyrs2.SelectedItem.Value, ddl_ce_perfmeasmon2.SelectedItem.Value)
ElseIf rb_ce_perfmeasqtr.Checked Then
objBaseClass = New BusinessObjectBase
from_dates = New String() {0, 1}
from_dates = objBaseClass.get_quater_year(ddl_ce_perfmeasyrs3.SelectedItem.Value, ddl_ce_perfmeasqtr1.SelectedItem.Value)
to_dates = New String() {0, 1}
to_dates = objBaseClass.get_quater_year(ddl_ce_perfmeasyrs4.SelectedItem.Value, ddl_ce_perfmeasqtr2.SelectedItem.Value)
End If
dal_obj = New Construction_Dal
dal_obj.con() = ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString()
CePM_BusinessObj = New Construction_Bll
Dt_CePM = CePM_BusinessObj.CePerfMeas_Retrive(p_measure, inf_factor, view_type, from_dates, to_dates)
'Session.Contents.RemoveAll()
End If
Catch ex As Exception
End Try
End Sub
End Class
**********************************************************************
Public Class Construction_Bll
Inherits BusinessObjectBase
Dim obj As Construction_Dal
Dim cost_type1 As String
Dim cost_type2 As String
Dim infl_factor As Boolean
Dim view_typ As String
Dim main_fdate As Date
Dim main_tdate As Date
Dim Dt_CePM As DataTable
Public Function CePerfMeas_Retrive(ByVal p_measure As String(), ByVal inf_factor As Boolean, ByVal view_type As String, ByVal from_dates As String(), ByVal to_dates As String()) As DataTable
Dim Dt_BegEst As DataTable
Dim Dt_EndEst As DataTable
cost_type1 = p_measure(0)
cost_type2 = p_measure(1)
infl_factor = inf_factor
view_typ = view_type
main_fdate = Convert.ToDateTime(from_dates(0))
main_tdate = Convert.ToDateTime(to_dates(0))
main_fdate = Format(main_fdate, "MM, dd, yyyy")
main_tdate = Format(main_tdate, "MM, dd, yyyy")
obj = New Construction_Dal
Dt_BegEst = obj.CePerfMeas_data(cost_type1, cost_type2, view_typ, main_fdate, main_tdate)
Dt_EndEst = obj.CePerfMeas_data(cost_type2, cost_type1, view_typ, main_fdate, main_tdate)
Return Dt_CePM
End Function
***********************************************************************
Public Class Construction_Dal
Inherits BusinessObjectBase
Public conn As OleDb.OleDbConnection
Dim a As String
Public Property con() As String
Get
Return a
End Get
Set(ByVal value As String)
a = value
End Set
End Property
#Region "Estimate measure Trends"
Public Function CePerfMeas_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 Dt_CePM As New DataTable()
Dim Sql_CePerfMeas1 As String
Dim dbcomm As OleDb.OleDbCommand
Dim str As String
str = con()
conn = New OleDb.OleDbConnection(str)
Sql_CePerfMeas1 = "select sum(CST_TYP_AMT), to_char(inside.CST_TYP_DT,'MM/01/yyyy') from IEIT002_CONTESTM,(Select to_char(CST_TYP_DT,'MM/01/yyyy') from IEI where CNSTESTM_CSTTYP_CD = " & cost_type2 & " and CST_TYP_DT between " & main_fdate & " and " & main_tdate & ") inside where CNSTESTM_CSTTYP_CD = " & cost_type1 & " and WPITEM || WPITMSEG || WPPHAZGP || WPPHAZTP || FINPRJSQ in (select WPITEM || WPITMSEG || WPPHAZGP || WPPHAZTP || FINPRJSQ where CNSTESTM_CSTTYP_CD = " & cost_type2 & " and CST_TYP_DT between " & main_fdate & " and " & main_tdate & ") "
dbcomm = New OleDb.OleDbCommand(Sql_CePerfMeas1, conn)
Dim da As New OleDb.OleDbDataAdapter(dbcomm)
da.Fill(Dt_CePM)
Return Dt_CePM
End Function
|
|
|
|
|
Stop spamming the forum.
---
single minded; short sighted; long gone;
|
|
|
|