|
function popup()
{
window.open('samplepage.htm');
}
setTimeout('popup()',10000);
We Can Do Anything, If We Want It
|
|
|
|
|
hi abolfazl,
Thanks for your reply. But i am using a System.timers.timer control because i need to do some functionality in the server side.after performing the code, i need to enable this popup.
So how can i go about this?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Hi all,
right now i am working on ASP & asp.Net project.
actually we are navigating the user from asp site(existing site) to asp.net site (right now we are developing this site).
i have to retrieve the asp page values in asp.net page. i tried this using query string, cookie, and session (also server variables), but nothing is working for me. when i displayed this values in the asp page using response.write statement, it is displaying correct values...but when i am trieying to retrieve these values in asp.net page, it is returning empty.
please i appreciate if anyone let me know how to work on this........
advanced thanks,
Rahi
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 add one HTML text box and one asp Label in the page and when i run this page in the local machine i can see these two controls and when i host this page and open this page i could see only HTML control the asp label control is missing in that page.what should i do for displaying the asp controls.in the property visible=true,enableviewstate=true,runat=server these all are correct for the asp control.
|
|
|
|
|
How you hosted it in the Server?
|
|
|
|
|
Hi Venkatesh,
I Hosted through CUTE FTP.I hosted one simple html page also that is working .If we are adding any asp controls in the page then it will not work,it will not show that controls in the page,but it will show HTML controls.when i take the source of the page i could see the controls value eg : Label.text="welcome" but it will not show in the page.
|
|
|
|
|
No Kurian,
I asked whether you published the website and then hosted it or simply hosted it into the server.
|
|
|
|
|
Does your hosting company host ASP.NET applications. The .NET Framework is required on your hosting server for the controls to be rendered. Your ASP.NET Application will not work on a server that does not have .NET Framework. Hope that helps.
|
|
|
|
|
Dear sirs:
I have a Web Form with an SqlDataSource with a simple select statement, and a GridView control that is tied to it. There is a ComboBox and a Submit button as well. When a selection is made (the first time) in the combo box and then the submit button is clicked, the Selecting Event for the SqlDataSource fires.
However, on subsequent "submits" I cannot get the event to fire again. What do I need to do to get this event to fire; thus letting me know that new data is being fetched from the database?
Thank you,
R. Hyland
|
|
|
|
|
1. What is your query?
2. Attach the code you are using
|
|
|
|
|
Fayu wrote: 1. What is your query?
2. Attach the code you are using
Here is the code for the SqlDataSource:
<<asp:sqldatasource
id="sqlDataSourceG5WingRailCar"
="" runat="server" connectionstring="<%$ ConnectionStrings:oracleConnectionString %>" providername="<%$ ConnectionStrings:oracleConnectionString.ProviderName %>" selectcommand="select distinct to_date( mh.historydatetime , 'DD-MM-YYYY' ) ,
rh.movedescription ,
( mds.pct_util * count( rh.movedescription ) )
from requesthistory rh
inner join movehistory mh on rh.itd_number = mh.itd_number
inner join movedescription mds on rh.movedescr_id = mds.movedescr_id
where rh.movedescr_id = 1 AND mh.discrepancy_id = 25 AND EXTRACT(MONTH FROM mh.historydatetime) = :MONTH_ID
group by to_date( mh.historydatetime , 'DD-MM-YYYY' ) ,
rh.movedescription ,
mds.pct_util
order by to_date( mh.historydatetime , 'DD-MM-YYYY' )" onselecting="sqlDataSourceG5WingRailCar_Selecting">
<<selectparameters>>
<<asp:controlparameter
="" controlid="dropDownListMonth" name="MONTH_ID" propertyname="SelectedValue">>
<>
<>
<>
There really is no code for the Selecting Event, other than just capturing some text into a label when the event occurs (for testing purposes).
Thanks
|
|
|
|
|
Hi
I am currently working on converting a classic asp page to c# asp.net . I have come across this and was wondering if anyone would know the c# equivalent. It basically runs through a url string and takes the values out after every '=' sign. I was wondering if anyone could help.
function findField( fieldName, postResponse )
items = split( postResponse, chr( 13 ) )
for idx = LBound( items ) to UBound( items )
item = replace( items( idx ), chr( 10 ), "" )
if InStr( item, fieldName & "=" ) = 1 then
' found
findField = right( item, len( item ) - len( fieldName ) - 1 )
Exit For
end if
next
end function
Thanks
Dean
|
|
|
|
|
You would just use the Split('=') command on your string. For instance:
string[] replies = reply.Split('=');
|
|
|
|
|
Ouch. First let's clean up that VBScript code:
Function FindField(ByVal fieldName, postResponse)
fieldName = fieldName & "="
items = Split(postResponse, vbCrLf)
For idx = 0 to UBound(items)
If InStr(item, fieldName) = 1 Then
FindField = Mid(item, Len(fieldName) + 1)
Exit For
End If
Next
End Function
Now it's easy to translate:
public string FindField(string fieldName, string postResponse) {
fieldName += "=";
foreach (string item in Regex.Split(postResponse, "\r\n")) {
if (item.StartsWith(fieldName)) {
return item.SubString(fieldName.Length);
}
}
}
---
single minded; short sighted; long gone;
|
|
|
|
|
i have a grid view.now i have added a template field to it and placed a check box in it.now i want to edit the selected rows only on click of edit button which is placed below grid view.
i want to edit multiple rows of grid view whick are selected by a checkbox..can anyone send the code as soon as possible
|
|
|
|
|
sudheer babu kodavati wrote: can anyone send the code as soon as possible
Can you send us the cash as soon as possible.
on a serious note, atleast try a bit and someone here can always help you if you are stuck somewhere. Dont expect someone to give you the cooked rice.
|
|
|
|
|
Manas Bhardwaj wrote: Can you send us the cash as soon as possible.
Just get his mailing address and send him an invoice
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Can anyone tell me how to add header and footer to a dynamically generated word document using .net 2.0 ? I am able to generate the word document but i am unable to add/make visible the headers and footers in the document. I want page numbers to be coming up in the footers and some text in the header for all the pages in the doc... A quick response will be very much helpful....
Nithin Kumar V, .NET Developer
-- modified at 9:12 Saturday 21st July, 2007
I am using ASP.NET for this purpose.. This should be interesting... i havent got exact solution yet... any help is very helpful...
Nithin Kumar V, .NET Developer
|
|
|
|
|
is there any link that exports the data to excel from dataset using asp.net 2005 (vb.net)
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
|
Hello,
I really somebody's help, please,
I need to get the count of rows that are equal to the given string. but I don't know how to store the result. Here is the code:
SqlDataSource1.SelectCommand="SELECT count(paperID) FROM Papers WHERE (paperID="+paperID+")";
now I need to get the value of count(paperID) and give it to some variable, like this:
int selectedNum = SqlDataSource1.Select();
if (selectedNum == 0)<br />
try<br />
{<br />
string insertID = "INSERT INTO Papers(paperID) VALUES (" + paperID + ");";<br />
SqlDataSource1.InsertCommand = insertID;<br />
SqlDataSource1.Insert();<br />
ok = true;<br />
}<br />
catch (Exception eee)<br />
{ ok = false; }
thank you!
|
|
|
|
|
hi,
first create a command object and then exectue the query i.e. select count(*) statement.
when executing the command object use the executescalar method and equate the result to an integer value.
the sample code:
sqlCommand cmd = new SqlCommand();
cmd.commandtype = commandtype.text
//assign your query to the command here
int count = cmd.executescalar()
....
carry on with your rest of the code, hope this helps.
Gautham
|
|
|
|
|
Thanx for your replay, but it shows me this error:
Error 1 Cannot implicitly convert type 'object' to 'int'. An explicit conversion exists (are you missing a cast?)
I changed it, but still I get this exception:
Exception Details: System.InvalidOperationException: <br />
ExecuteScalar: Connection property has not been initialized.<br />
<br />
Source Error:<br />
<br />
Line 52: cmd.CommandText="SELECT count(paperID) FROM Papers WHERE (paperID="+paperID+")";<br />
Line 53:
Line 54: int count=(int) cmd.ExecuteScalar();<br />
thanx
|
|
|
|
|
Let me know is paperID is ur parameter? If yes then when u r going to select then pass this parameter as well
int selectedNum = SqlDataSource1.select(paperID);
hope this will help u
Regards, Arslan Ilyas
|
|
|
|
|
Hi, the following code is taken from a tutorial on reading blobs by Ganegoda.
Private Sub CreateImage(ByVal id As String)<br />
<br />
Dim _con As New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("DB"))<br />
<br />
Try<br />
_con.Open()<br />
Dim _cmd As SqlCommand = _con.CreateCommand()<br />
_cmd.CommandText = "select logo from" + " pub_info where pub_id='" + id + "'"<br />
Dim _buf As Byte() = CByte(_cmd.ExecuteScalar())<br />
Response.ContentType = "image/gif"<br />
Response.BinaryWrite(_buf)<br />
Catch<br />
Finally<br />
_con.Close()<br />
End Try<br />
End Sub
I am new to vb.net and not very familiar with it. I have 2 questions regarding the code above.
1) Why is there a plus sign before and after id in the line where pub_id='" + id + "'" ?
2) From reading the MSDN, _con.CreateCommand() is supposed to create a connection and return a SqlCommand object associated with the current connection. However I'm still not clear as to what that means. Is it the same as the following?
<br />
Dim _cmd As SqlCommand <br />
Dim Filter as String<br />
Filter = "select logo from" + " pub_info where pub_id='" + id + "'"<br />
_cmd = New SqlCommand(Filter, _con) <br />
Thanks in advance for your help.
-- modified at 4:04 Sunday 15th July, 2007
|
|
|
|