|
Socheat.Net wrote: For ASP
For ASP.NET may not
Thanks.. but is there any way to include the .asp page in ASP.net?
Best Regards,
Pei Sun
|
|
|
|
|
I have tried but get nothing, I hope i can get in future.
Socheat
................
|
|
|
|
|
You can't mix ASP and ASP.NET in the same page.
If you register the file type to be handled by both engines, you might be able to make one engine output code that will be executed by the next. I don't know if this is even possible, and if it is, it's hardly advisable.
If you want to show the content of an ASP page as part of an ASPX page, you can place an iframe on the ASPX page and show the ASP page in it.
Also, you could make the ASPX page request the ASP page from the server, and incorporate the response as part of the page.
---
b { font-weight: normal; }
|
|
|
|
|
HI
i hv textbox ,and in this textbox the student enter the rollno,after entering the rollno the student press the enter key,,whn the student press the enter key i wnt to capture the Enter Event on the textbox and getvalues from the textbox,how can i capture the enter event ..,and after getting the value from the text box i fill the droopdwnlist on the behave of rollno.
tell me how can i get the enterkey Press ,and on this Enter key i wnt to take the value from the textbox
|
|
|
|
|
you can use script to call the onkeypress function and from there call any event in your code to fill your list like this
in page load event write this line
TextBox.Attributes.Add("onkeydown", "FillList()");
write this script in aspx page
function FillList()<br />
{<br />
if(event.keyCode == 13)<br />
{<br />
document.getElementById("Buttion2").click();<br />
}<br />
}
you must have a Button2 click event in your code file to fill list.
Hope this will help
hope this will help you
Nav.
|
|
|
|
|
i have no button in my from,i have a dropdownlist that i wnt to fill whn a uere press the enter key in the textbox,i want to load the dropdownlist when user press the Enter key in the textbox..would i write the
document.getElementById("Dropdownlist").click();
or tell me abt click event ,how can i write this event in the ,i mean to say can i write this event in code,how?
i shall be thkfull
-- modified at 6:02 Wednesday 5th July, 2006
|
|
|
|
|
you can add a button to your page and make it invisible and handle list fill on button click event.
Nav.
|
|
|
|
|
this i call in the page load event
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
'Fill Drop Down List with Years
'conConnection.Open()
If Not Page.IsPostBack Then
txtrollno.Attributes.Add("onkeydown", "fill_list();")
bt_hidden.Visible = False
End If
End Sub
this is my javascript
function fill_list()
{
if(event.keycode==13)
{
document.getElementById("bt_hidden").click;
}
}
this is my hidden button that id is btn_hidden
"""<asp:button id="bt_hidden" runat="server" ""onclick="loads" visible="False" ""height="19px" width="56px" text="Button">"""
this is my load fuction that i call onClick bt_hidden event
Sub loads(ByVal sender As System.Object, ByVal e As System.EventArgs)
Session.Add("Rollno", Trim(txtrollno.Text))
Try
Dim ds As DataSet
Dim ad As New OleDbDataAdapter
Dim conn_string As String = ConfigurationSettings.AppSettings.Item("DBSettings")
conConnection = New OleDbConnection(conn_string)
conConnection.Open()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.Connection = conConnection
cmd.CommandText = "SELECT DISTINCT Setup_Session.Description " & _
"FROM Course_Result LEFT OUTER JOIN " & _
"Setup_Session ON Course_Result.Session_id = Setup_Session.Session_ID " & _
"WHERE (Course_Result.Rollno = 'b-00250')"
'"WHERE (Course_Result.Rollno = '" & Session.Item("Rollno") & "')"
'ds = New DataSet
cmd.CommandType = CommandType.Text
dr = cmd.ExecuteReader
While dr.Read
ddlSession.Items.Add(dr.Item("Description"))
End While
conConnection.Close()
Catch ex As Exception
lblMsg.Text = "Db Server is Down"
lblMsg.Visible = True
End Try
End Sub
bt my dropdownlist is nt filled
tell me either i can fill the dropdoenlist in this clickevent
'Private Sub bt_hidden_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_hidden.Click
tell me where i got wrong ..plz
|
|
|
|
|
can you pls try by setting visible property to true and button width to zero
and write a test function which add on or two items in list like this
FillList()<br />
{<br />
ddlSession.Items.Add("A");<br />
ddlSession.Items.Add("B");<br />
}
and call this function from button click to check that flow is working.
if its working then you need to check your load function.
Nav.
|
|
|
|
|
the problem is exist in the javascript,javascript function not call the click event of the button server control.......tell how can i call the click event of the server control
thks
|
|
|
|
|
dont set the button visible to false and then try
Nav.
|
|
|
|
|
Hi, I have written following piece of code on button click event to fill the data in DataGrid in C# Windows application and in ASP.NET web application. I am using SQL 2000.
<br />
string sConnection=@"Data Source=(local)\SOFTSKILLS; Initial Catalog=Northwind; Integrated Security=True";<br />
SqlConnection con = new SqlConnection(sConnection);<br />
con.Open();<br />
string sSQL = "Select * from Employees";<br />
SqlDataAdapter adpt = new SqlDataAdapter(sSQL, con);<br />
DataSet ds = new DataSet();<br />
adpt.Fill(ds);<br />
dataGrid1.DataSource = ds;<br />
con.Close();<br />
The windows application code works but I get errors in ASP.Net webform application.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'machinename\ASPNET'.
Source Error:
Line 59: string sConnection=@"Data Source=(local)\SOFTSKILLS; Initial Catalog=Northwind; Integrated Security=True";
Line 60: SqlConnection con = new SqlConnection(sConnection);
Line 61: con.Open();
Line 62: string sSQL = "Select * from Employees";
Line 63: SqlDataAdapter adpt = new SqlDataAdapter(sSQL, con);
Source File: c:\personal folders\manisha\vs 2003 projects\myprojects\anil\webform1.aspx.cs Line: 61
Stack Trace:
[SqlException: Login failed for user 'ANIL-MANISHA\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
Anil.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\personal folders\manisha\vs 2003 projects\myprojects\anil\webform1.aspx.cs:61
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Can anyone please suggest me whats going on here?
Thanks.
|
|
|
|
|
|
|
Hi further to my last post, I was trying to resolve this issue and did the following:
SQL Server Enterprise Manager -> Security -> Logins (right click) -> New Login -> Opened a new dialog with number of login options.
Selected "ASPNET... " and clicked yes. Also I added default database as "Northwind".
I hope if someone has this problem, it will help.
Thanks
|
|
|
|
|
username will be 'sa'.try it.and use mixed authontication mode.
hi.
|
|
|
|
|
Hi
I have HTMLInputElement abc whose type is radio, i was using this to check its element whose index is 1.
var abc = document.forms[0].elements[i]; // i is loop variable.
document.forms[0].item(abc.name, 1).checked = true;
it is working in IE but not in FireFox
Is there any way around it?
Regards
Shajeel
|
|
|
|
|
have u mentioned with scripting language u are using, coz in IE the default is "vb script " and in FireFor the default is javascript. Please mention the scripting language
|
|
|
|
|
i m using javascript
Regards
Shajeel
|
|
|
|
|
Hi
I am working on ASP.net application
I want to group the controls selected by the user at run time by javascript (client side code)
If any body know please let me know how to approach for that.
Thanks..
|
|
|
|
|
Hi ,
I have an application in asp .net like the below :
- IIS authentication using Client certificate .
- After successful Authentication in IIS , Form Based Authentication to enter into the application
- The whole application except the Authentication ( Login.aspx, Login.ascx, web.config ) are htm files.
- After succesful login ( Authetication verification ) , the user will be redirected to some other page ( one htm file in a subdirectory).
Issue :
-> How can i have idle timeout implemented in this scenario ?
-> Even if the user is not idle ( doing some processing in htm page ) , after 20 ( timeout in web.config ) minutes the user is being asked to enter Login name and Password !!!
Additional Information :-
In web.config the timeout is set to 20 mins .
I have added the .htm extension ( for the webdirectory ) to be handled by .net framework
Hope some body can help me out .
Thanks in Advance
Guru
|
|
|
|
|
Did anyone know how to import the CSV file into MSSQL database using ASP.net. I'm using the vb script to develope the page. This is urgent.. If anyone know how to solve this problem, please post the sample coding here. Me will appreciate on your help. Thanks..
-- modified at 5:17 Wednesday 5th July, 2006
|
|
|
|
|
Hello All,
How to send values from one page to another in asp.net,
Can any body suggest me how to do the above....
thanks in advance
shree
|
|
|
|
|
There are various ways..Through Session objects,Query Strings ..All depends on your requirement
Check this :
http://msdn2.microsoft.com/en-us/library/50x35554.aspx
|
|
|
|
|