|
your first step is to look at your source and work out the Ids of the controls, although if you just do that and use what you read, they could change if you change your page.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi
function TotalBudgetAmount()
{
var intCount=2;
var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount");
var TotalAmount=0;
while (txtBudgetAmount != null)
{
alert("hai");
if (parseFloat(txtBudgetAmount.value))
TotalAmount = TotalAmount + parseFloat(txtBudgetAmount.value)
intCount += 1;
var txtBudgetAmount=document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount");
}
var lblTotalBudgetAmount = document.getElementById("dgridBudgetAllocationDetails__ctl" +intCount+"_lblTotalAmount");
if (lblTotalBudgetAmount != null)
document.write("The number is "+ parseFloat(TotalAmount).toFixed(2))
}
this is my code here i need to add text bob value and put in to label but here values are not adding i thougt error in
var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount");
this line please review this and reply me thank u
reg
nantha
|
|
|
|
|
i want to do email address validation in javascript.. can anyone help me out
lakshmanak
|
|
|
|
|
|
Put the reuglar expression validator and select email check in its regular expression string
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... "
|
|
|
|
|
Let us say you have a variable xyz which contains the value or text entered as email address just try this in your js function
var ret=xyz.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)
if(ret==-1)
{
alert("Invalid email address!");
}
and check the value returned by it if the return value is -1 then the text contains some invalid email address otherwise the email address is valid
Shujaat
|
|
|
|
|
dear all
i have to run a dts package to dump a table's data to a shared drive.
i want to provide this facility to my End Users.
whenever they want they shd be able to run that DTS on click of a button
for this i have done the following code......
Try
Dim dtsp As New DTS.Package
dtsp.LoadFromSQLServer( _
ServerName:="servername", _
ServerUserName:="UID", _
ServerPassword:="PWD", _
PackageName:="PackageName")
dtsp.Execute()
Catch ex As Exception
lblError.Text = ex.Message
End Try
when i run it it does not give any error neither it gives me the desired file,which should be generated after running the dts.
on the other hand when i run it manually it generates the same.
any suggetion
|
|
|
|
|
Create a stored procedure and execute the DTS package from with in the stored procedure. then just execute that Stored Procedure from your asp.net page.
here is an article that may help[^]
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
i have done that also....
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER PROCEDURE usp_ImportData AS
begin
DECLARE @DTSRUNCommand as varchar(255)
SET @DTSRUNCommand =
'DTSRUN /N ' +
'PackageName /E /S ' +
'@@ServerName'
EXEC master..xp_cmdshell @DTSRUNCommand
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
it gives me some permission problem.
DTSRun: Loading...
Error: -2147467259 (80004005); Provider Error: 17 (11)
Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0
NULL
what to do..
i am system admin on the Server.
And i have all the rights.
|
|
|
|
|
Hi all
I want to display the database items using datalist but i want to add a column for serial number also plz tell me how to do that with code.
regards
Yogesh Agarwal
|
|
|
|
|
Add a label control to the DataList ItemTemplate. In the ItemDataBound Event of the Datalist Control assign value(ItemIndex + 1) to the label.
Ctype(e.Item.Findcontrol("lblSerialNo"),Label).Text = e.Item.ItemIndex + 1
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Sorry John i can't under stand what exactly i have to do could you explain it properly plz
Thanks you your reply
Regards
Yogesh Agarwal
|
|
|
|
|
1. In the ItemTemplate part of the DataList control, add a Label Control (to display the serial No).
2. Datalist control has a ItemDataBound Event which will get executed for each item. In that event find the control and assign the Value. ItemIndex property will return the index value of the Item. same value you can use to show as a serial no. since the Index starts from 0 we add plus 1 to the Index value.
something like this you should add in the ItemDataBound Event of the DataList Control.
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Ctype(e.Item.Findcontrol("lblSerialNo"),Label).Text = e.Item.ItemIndex + 1
End If
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
hi
i am developing a web based c# application in vs2005. i am facing a problem that whenever i place a new control on to the webform, it is by default absolute positioned.
for eg. the markup is as folows
<asp:TextBox ID="TextBox1" runat="server" Style="z-index: 100; left: 0px; position: absolute;top: 0px"></asp:TextBox>
i have to get around it by deleting the style attribute (along with it goes the trouble some z-index thingy)
is there any way i can set in the IDE that the controls are not absolutely positioned.
thanks in advance
Kunal
|
|
|
|
|
Visual Studio --> Menu Tools --> Options --> HTMlDesigner (in Treeview) --> CSS Positioning --> uncheck "Change positioning to the following ... "
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
thanks... that worked..
kunal
|
|
|
|
|
Check out Positioning Checkbox is checked or not
Tools--->Options--->HTML Designer--->CSS Positioning--->
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
You can change that under Layout-> Position -> Auto-position Options.
Same problem Discused here[^]
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
hi
i m working in asp.net 1.0 C#, i m dynamiclly generated check box control on web page acc. to the value in database.
My prob is how to check how many checkbox is click by the user on submit the page.
(Plzz give me sample code if possible)
thanks in advance
|
|
|
|
|
Do you have the CheckboxList in C# 1.0 ?
if yes then use that one
or if ou don't have then check the Request object it will contain values of of all checked checkboxes
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... "
|
|
|
|
|
How t o achieve form authentication for login page?
|
|
|
|
|
|
Hi all,
From my DATABASE i get Dataset to my GRIDVIEW.
On run time I want to change the value of a cell.
For example:
Instead of "0" i want to write "N/A".
let's make it clear - I don't want to update the value in the DB
just change the specific value of the cell that the user will see on the web.
Hope I made my self clear.
Thanks for your help!!!
|
|
|
|
|
Check the fallowing url will get many articels regarding the Gridview
http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]
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... "
|
|
|
|
|
OnRowDataBound Event
Find Control,Get values and Set Values
For Example
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
If(((Label)e.Row.Findcontrol("lblId")).Text=="0")<br />
{<br />
((Label)e.Row.Findcontrol("lblId")).Text="N/A";<br />
}<br />
}
Best Regard
Pathan
---------------------------------------------------
|
|
|
|