|
i am putting a dropdownbox in a ajax updatepanel and loading data in that dropdown box.i want to display the selected data in atextbox . it's taking time to display it in textbox,ie;more than 5 minitues.how can i solve this
|
|
|
|
|
I believe the ASP.NET AJAX stuff does a full page postback to do the AJAX call. Set some breakpoints and work out where the bottleneck is, then work out if it's something you can work around.
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 )
|
|
|
|
|
i am new in ajax.can anyone tell me what i can do to solve the problem?.it is urgent......
|
|
|
|
|
anujose wrote: .it is urgent......
It doesn't matter
|
|
|
|
|
I told you, based on the information you gave us, there's not much else I can say. And, you're not really using AJAX, you're using a Microsoft library which does AJAX for you. This probably limits your access to information that allows you to do debugging or to control the process.
You can set breakpoints in your code, and you can see what code is taking that long. We sure as hell can't tell you what code is taking that long, we've not even seen your code.
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 )
|
|
|
|
|
anujose wrote: i want to display the selected data in atextbox . it's taking time to display it in textbox,ie;more than 5 minitues.
What operation you are doing to take more than 5minutes for loading data ?
|
|
|
|
|
i have a dropdownbox and a textbox .both controls i put in update panel and i am loading the dropdown box during page load.after that when i select a data from dropdown list it is displaying in the Textbox.to display data in textbox is taking time.
ithis is the code i am writing in codebehing file
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
for (int i = 0; i < 4000; i++)
{
DropDownList1.Items.Add("asdds" + i);
}
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = DropDownList1.SelectedItem.Text;
}
}
nothing else i am doing...
i have installed ASPAJAXExtSetup and i am taking aspnet-ajaxenabled website application
|
|
|
|
|
anujose wrote: if(!IsPostBack)
{
for (int i = 0; i < 4000; i++)
{
DropDownList1.Items.Add("asdds" + i);
}
}
OK, so this is obviously test code. What happens if you set breakpoints in this code ? I'd assume the AJAX calls count as a postback, but it's worth checking.
If you set your breakpoint in index changed event, does it fire right away, or after the 5 minutes ? This is the sort of thing you need to be doing, in order to work out where the problem lies.
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 )
|
|
|
|
|
when i am selecting a data the ispostback event is working properly.But when it comes to selected index changed event the code
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text = DropDownList1.SelectedItem.Text;-> this much is working fine.
but when it comes to
} here it's taking time
|
|
|
|
|
OK - it seems to me then that you're hitting something to do with the framework itself. It does seem odd. I don't use the MS library myself, so I really don't know what could cause this. I will say that if you wrote your own AJAX code, you'd have a lot more control over what was happening.
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 )
|
|
|
|
|
How to find the primary key or foreign key of a table using adapter.
VanithaVasu
|
|
|
|
|
To find the primary key
call the DataAdapter.FillSchema method on any selectcommand. you will be able to get the primary key using DataSet.Table("Name").PrimaryKey
You can't use the same approach to find the foreign keys
Regards
John
|
|
|
|
|
Hi,
I have a following code
how to upload xml file to server.
// files upload function
function btn_send.onclick()
{
// create ADO-stream Object
var ado_stream = new ActiveXObject("ADODB.Stream");
// create XML document with default header and primary node
var xml_dom = new ActiveXObject("MSXML2.DOMDocument");
xml_dom.loadXML('<?xml version="1.0" ?> <root/>');
// specify namespaces datatypes
xml_dom.documentElement.setAttribute("xmlns:dt", "urn:schemas-microsoft-com:datatypes");
// create a new node and set binary content
var l_node1 = xml_dom.createElement("file1");
l_node1.dataType = "bin.base64";
// open stream object and read source file
ado_stream.Type = 1; // 1=adTypeBinary
ado_stream.Open();
ado_stream.LoadFromFile("c:\\tmp\\myfile.doc");
// store file content into XML node
l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll
ado_stream.Close();
xml_dom.documentElement.appendChild(l_node1);
// we can create more XML nodes for multiple file upload
// send XML documento to Web server
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("POST","./default.aspx",false);
xmlhttp.send(xml_dom);
// show server message in message-area
div_message.innerHTML = xmlhttp.ResponseText;
}
|
|
|
|
|
you can use file upload control that is already provided
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... "
|
|
|
|
|
Hi,
I want to set the height and width of grid view control programmatically after databind is called. what ever may be the height's value, it is not getting applied to grid view.
can any body help me doing this.
VijayKrishna
|
|
|
|
|
try this
Gridview1.Width=Unit.persentage(100);
best regard
pathan
---------------------------------------------------
|
|
|
|
|
Hi again!
I want to move from SQL DB to MS Access but i have problem in converting SQL Data Types to Access Data Type while coding...
MS Access program Data Type are:
Text
Memo
Number
Date/Time
Currency
AutoNumber
Yes/No
OLE Object
Hyperlink
Attachment
What are the related data types From MS Access to OLEDB while coding?
.NET Framework Class Library MSDN!:
OleDbType Enumeration
Member name Description
BigInt A 64-bit signed integer (DBTYPE_I8). This maps to Int64.
Binary A stream of binary data (DBTYPE_BYTES). This maps to an Array of type Byte.
Boolean A Boolean value (DBTYPE_BOOL). This maps to Boolean.
BSTR A null-terminated character string of Unicode characters (DBTYPE_BSTR). This maps to String.
Char A character string (DBTYPE_STR). This maps to String.
Currency A currency value ranging from -2 63 (or -922,337,203,685,477.5808) to 2 63 -1 (or +922,337,203,685,477.5807) with an accuracy to a ten-thousandth of a currency unit (DBTYPE_CY). This maps to Decimal.
Date Date data, stored as a double (DBTYPE_DATE). The whole portion is the number of days since December 30, 1899, and the fractional portion is a fraction of a day. This maps to DateTime.
DBDate Date data in the format yyyymmdd (DBTYPE_DBDATE). This maps to DateTime.
DBTime Time data in the format hhmmss (DBTYPE_DBTIME). This maps to TimeSpan.
DBTimeStamp Data and time data in the format yyyymmddhhmmss (DBTYPE_DBTIMESTAMP). This maps to DateTime.
Decimal A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1 (DBTYPE_DECIMAL). This maps to Decimal.
Double A floating-point number within the range of -1.79E +308 through 1.79E +308 (DBTYPE_R8). This maps to Double.
Empty No value (DBTYPE_EMPTY).
Error A 32-bit error code (DBTYPE_ERROR). This maps to Exception.
Filetime A 64-bit unsigned integer representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME). This maps to DateTime.
Guid A globally unique identifier (or GUID) (DBTYPE_GUID). This maps to Guid.
IDispatch A pointer to an IDispatch interface (DBTYPE_IDISPATCH). This maps to Object.
This data type is not currently supported by ADO.NET. Usage may cause unpredictable results.
Integer A 32-bit signed integer (DBTYPE_I4). This maps to Int32.
IUnknown A pointer to an IUnknown interface (DBTYPE_UNKNOWN). This maps to Object.
This data type is not currently supported by ADO.NET. Usage may cause unpredictable results.
LongVarBinary A long binary value (OleDbParameter only). This maps to an Array of type Byte.
LongVarChar A long string value (OleDbParameter only). This maps to String.
LongVarWChar A long null-terminated Unicode string value (OleDbParameter only). This maps to String.
Numeric An exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC). This maps to Decimal.
PropVariant An automation PROPVARIANT (DBTYPE_PROP_VARIANT). This maps to Object.
Single A floating-point number within the range of -3.40E +38 through 3.40E +38 (DBTYPE_R4). This maps to Single.
SmallInt A 16-bit signed integer (DBTYPE_I2). This maps to Int16.
TinyInt A 8-bit signed integer (DBTYPE_I1). This maps to SByte.
UnsignedBigInt A 64-bit unsigned integer (DBTYPE_UI8). This maps to UInt64.
UnsignedInt A 32-bit unsigned integer (DBTYPE_UI4). This maps to UInt32.
UnsignedSmallInt A 16-bit unsigned integer (DBTYPE_UI2). This maps to UInt16.
UnsignedTinyInt A 8-bit unsigned integer (DBTYPE_UI1). This maps to Byte.
VarBinary A variable-length stream of binary data (OleDbParameter only). This maps to an Array of type Byte.
VarChar A variable-length stream of non-Unicode characters (OleDbParameter only). This maps to String.
Variant A special data type that can contain numeric, string, binary, or date data, and also the special values Empty and Null (DBTYPE_VARIANT). This type is assumed if no other is specified. This maps to Object.
VarNumeric A variable-length numeric value (OleDbParameter only). This maps to Decimal.
VarWChar A variable-length, null-terminated stream of Unicode characters (OleDbParameter only). This maps to String.
WChar A null-terminated stream of Unicode characters (DBTYPE_WSTR). This maps to String.
__________
Sorry for this long post!
|
|
|
|
|
woff!!
is there any answer?!
|
|
|
|
|
Thanks&Regards,
Priya.
|
|
|
|
|
The only way is to use Javascript on the client side. You can add an attribute to do that to the ASP.NET control in Page_Load for example.
Assuming you have a button btnSubmit , you would do something like:
if (!IsPostBack)
{
btnSubmit.Attributes.Add("onclick","return confirm('Submit report?');");
}
The first parameter of the Attributes.Add method is the clientside event, the second parameter is any Javascript code you would like to execute.
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Talal,
Talal Sultan wrote: btnSubmit.Attributes.Add("onclick","return confirm('Submit report?');");
Question was how to pop up a window. But this is different . Am I missing something ?
|
|
|
|
|
ooops, you're right. Popping up a message box is such a common question that I thought this is what the question was. Sorry my mistake
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
jus to make the record straight
btnSubmit.Attributes.Add("onclick","window.open('PagePath','WindowName','WindowAttributes');")
Regards
John
|
|
|
|
|
ASP.NET can't do anything on popping up a window. It can be done by client side scripting like Javascript. Try window.open("pagename") .
|
|
|
|
|