|
Ajax timer control cannot be used in your cause. ajax timer control is used to run some server side code in predefined intervals. Technically it is possible to use ajax timer control,updae panel and a simple label to simulate such timer.But you dont want your application to post back every 1 sec to get a new time. Do you ?
You have to use the javascript to do this.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I want to bind hyperlink control which is inside the Gridview and navigate to the URL which is coming from a variable in the cs file of same application
Anyone have any idea?
Thanks in advance,
|
|
|
|
|
Create the field as a template field.
<asp:templatefield headertext="Timetable">
<itemtemplate>
<a href="'<% = [Your variable name] %>'">Name here </a>
</itemtemplate>
</asp:templatefield>
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Inside a GridView i m writing like this
<asp:templatefield headertext="hyperlink">
<itemtemplate> <asp:hyperlink id="hlink" runat="server" navigateurl="">]]>' Target="_blank">Download Here
But its not working
i have a variable where i had my filepath which i m getting after coding for getting URL
and giving the hyperlink the variable name as DataBinder.Eval
But its not working
|
|
|
|
|
I guess DataBinder.Eval with serch with in the GridView's Data source to find out the value. You may also try putting the hyperlink in a hidden filed and do like this ( say the hidden field name is txtHidden )
<asp:hyperlink id="hlink" runat="server" navigateurl="'<% = txtHidden.Value %>'">Download Here </a>
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanks everybody for replying the problem is solved...........
|
|
|
|
|
Hi, I am writing a stored procedure in SQL server 2005, and when I want to save it gives me two mistakes for @AddedDate and @ArticleId. Any Help??? Thanks Ahead, below is my stored procedure:
CREATE PROCEDURE dbo.tbl_Artikl_InsertArticle
{
@AddedDate datetime,
@AddedBy nvarchar(256),
@CategoryID int,
@Title nvarchar(256),
@Abstract nvarchar(4000),
@Body ntext,
@Country nvarchar(256),
@City nvarchar(256),
@ReleaseDate datetime,
@ExpiryDate datetime,
@Approved bit,
@Listed bit,
@CommentsEnabled bit,
@OnlyForMembers bit,
@ArticleID int OUTPUT
}
AS
SET NOCOUNT ON
INSERT INTO tblArtikl
(AddedDate, AddedBy, CategoryID, Title, Abstract, Body, Country, City, ReleaseDate, ExpiryDate, Approved, Listed, CommentsEnabled, OnlyForMembers)
VALUES (@AddedDate, @AddedBy, @CategoryID, @Title, @Abstract, @Body, @Country, @City, @ReleaseDate, @ExpiryDate, @Approved, @Listed, @CommentsEnabled, @OnlyForMembers)
SET @ArticleID = scope_identity()
|
|
|
|
|
|
When I did that, I solve that problem but now I have a new error:
for CommentsEnabled and OnlyForMembers, it says Invalid Column Name.
in the table they are declared like [Comments Enabled] and [Only For Members]. Is there any difference, cause I declare them like [Comments Enabled] and [Only For Members] in the stored procedure as well, and it gives me the same mistake.
CREATE PROCEDURE dbo.tbl_Artikl_InsertArticle
(
@AddedDate datetime,
@AddedBy nvarchar(256),
@CategoryID int,
@Title nvarchar(256),
@Abstract nvarchar(4000),
@Body ntext,
@Country nvarchar(256),
@City nvarchar(256),
@ReleaseDate datetime,
@ExpiryDate datetime,
@Approved bit,
@Listed bit,
@CommentsEnabled bit,
@OnlyForMembers bit,
@ArticleID int OUTPUT
)
AS
SET NOCOUNT ON
INSERT INTO tblArtikl
(AddedDate, AddedBy, CategoryID, Title, Abstract, Body, Country, City, ReleaseDate,
ExpiryDate, Approved, Listed, CommentsEnabled, OnlyForMembers)
VALUES (@AddedDate, @AddedBy, @CategoryID, @Title, @Abstract, @Body, @Country,
@City, @ReleaseDate, @ExpiryDate, @Approved, @Listed, @CommentsEnabled, @OnlyForMembers)
SET @ArticleID = scope_identity()
|
|
|
|
|
IF this is the name in the table "[Comments Enabled]", then that is the name you have to use. Are you sure you didn't have a typo when youtried to put them in?
|
|
|
|
|
I solved. Thx for the help. Have a nice day
|
|
|
|
|
Hi,
Iam stuck with how to use XML web service from my ASP page.
In .Net i was using the web wervices by using 'Add Web Reference' but in ASP i didn't find any such thing.
I want to know how to call web service from ASP.
|
|
|
|
|
ASP questions should be posted in the Web Development forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hai
I need a help to access an <asp:dropdownlist> selected value which is placed inside an update panel.This DropDownList is inside a table. for that i have a code like this
foreach(HtmlTableRow tr in purchaseDetails.Rows)
{
foreach (HtmlTableCell tc in tr.Cells)
{
foreach(Control ctrl in tc.Controls)
{
if (ctrl is DropDownList)
{
}
}
}
}
but i cant access this DropDownList
Please help me
|
|
|
|
|
sorry what do you mean you can't access it?
wouldnt you just have
dddropdownlist.selectedvalue like that?
|
|
|
|
|
Why you have to take this much of pain to access a dropdownlist inside a UpdatePanel. It can be accessed similar to a normal drop down list
selectedValue = DropdownList1.SelectedValue;
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I have a table with one field primary key.when i added data into the table i retrieve the id of the last added data and bind the data into a grid.I want to retrieve the rowindex of the last added data using the id.
|
|
|
|
|
DataView view = new DataView((DataTable)gridView.DataSource);
Your row index = view.Find(key);
Here key will be your primary key.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I given like that .but an exception of object refrence is not is occured.The code is attached below.
DataView v = new DataView((DataTable)Gdv_Dept_List.DataSource);
int row = v.Find(outstatus);
here outstatus is the retrieving primary key.pla help and sort out the problem.
|
|
|
|
|
object reference usuauly means you have referenced something either doesnt exist at all or hasnt been set yet
|
|
|
|
|
Please sort out the problem through the code.
|
|
|
|
|
What value should be set for object refrence in this case.plz help me its urgent..
|
|
|
|
|
i'm not sure, try commenting out bits of code and see what happens then you might find the line of code that is causing the problem, then post that on the forum
|
|
|
|
|
I have used AJAX Calender control to select date and now i want to use this date which is going to send to the SQL Server2005 database for processing.
How can I convert the datetime from the text box i.e. in string format returned by AJAX calender control to ASP.NET2.0 DateTime so that I can pass this to SQL Server2005?
Thanks in Advance
|
|
|
|
|
ASP.Net dateTime ???... You can convert a text to DateTime by writing
DateTime.Parse(string);..In your case DateTime.Parse(txtDateBox.Text) or something.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|