|
place the controls in the content panel,which in the master page.
|
|
|
|
|
iam using update progess control. whenever page loading alert come and
page should be disable.
this is my code .how to resolve?
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID = "UpdatePanel1">
<ProgressTemplate> Update in Progress </ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
|
|
|
|
|
kathyani wrote: henever page loading alert come and
page should be disable.
What is an alert message?
please don't forget to vote on the post that helped you.
|
|
|
|
|
whenever loading the page alert message is UPDATE IN PROGRESS..
|
|
|
|
|
Try ClientScripting for MS Ajax.
For example,
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest_Handler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest_Handler);
function BeginRequest_Handler(){
document.body.disabled=true;
}
function EndRequest_Handler(){
document.body.disabled=false;
}
The above code should be place below the <scriptmanager> tag because "Sys" class is a part of ScriptManager.
|
|
|
|
|
I put the code below scriptManager.whenever iam running the application
Sys.WebForms.PageRequestManager.................Total code is appearing
in the browser..
|
|
|
|
|
Oh no...
Its a JavaScript code. You have to place it inside tag.
|
|
|
|
|
|
|
What does this have to do with ASP.NET? This is a SQL query.
|
|
|
|
|
Post ur problem in SQL and Database discussions
|
|
|
|
|
iam having a page where iam having nearly 5 textboxes and two radiou buttons and 5 ddls now iam having a value form hidden field .if the hidden field value is 1 then i should not allow user not to edit any control in that page .how it is possible...if hidden field value is 0 then he can edit the page.
|
|
|
|
|
Just check what the value is and then set the fields to enabled = false
|
|
|
|
|
I am using <asp:Table> control. and displaying data dynamically. but i want to give Pageing in this table.. then Please suggest me how to give pageing in asp table.
Thanks
modified on Thursday, July 17, 2008 6:35 AM
|
|
|
|
|
raushan_9 wrote: I am using <asp:table xmlns:asp="#unknown"> control. and displaying data dynamically. but i want to give Pageing in this table.. then Please suggest me how to give pageing in asp table.
Follow these steps
Step 1: Add one column field in DataTable
Retrieve Data from database and add one column in this datatable using asp.net and increament it by 1.
Suppose you have 100 records so that field values should be 1 to 100
Step 2:Set property
Create three properties CurrentPage, PageSize and PageCount
PageCount is total number of record
PageSize to display number of record on page
CurrentPage is PageIndex
Set these three properties value on page load event after retrieving data from database and add column field in this datatable
Step 3:Take two link Button
Take Previous and Next Link button
Step 4:Get record from DataTable and bind asp table
Before calling this,you must add one column field in datatable so you can get number of record
Suppose,You have 100 record and you have set pagesize 10
first time CurrentPage should be 1
You can get 1 to 10 record from datatable by using select method of datatable
Suppose you add one column with ID,then your code looks like this
you can get "to" to "from" value by this
int t=(CurrentPage-1)*PageSize;
int f=CurrentPage*PageSize+1; 1*10+1=11
DataRow[] dRow=dataTable.Select("ID>"+t+" and ID<"+f);
the Above line will return you first ten record,you can bind your asp table with these 10 records
step 5: On Next Link Button event
On Next Button event, increament CurrentPage
Suppose at first time you click on Next Button,CurrentPage increament by 1.
now currentPage is 2
calculate again "to" to "from" value
int t=(CurrentPage-1)*PageSize;
int f=CurrentPage*PageSize+1; 2*10+1=21
DataRow[] dRow=dataTable.Select("ID>"+t+" and ID<"+f);
you can loop through DataRow array and get value from it and bind your asp table
the Above line will return you second 11 to 20 records
Now check here
if PageCount/PageSize is less then currentpage then disable next link button
Suppose you have 99 records your current page 10 then it display 90 to 99 records.Next you have not record so it should be disbled.
Step 6:On previous link button
at first time, when CurrentPage is 1,Privous button link should be disabled.
Same thing here.you have to decrease CurrentPage and process will be same
Note : Store current page in ViewState so you can get it from it other wise it will set default.
I hope this will help you
best of luck
please don't forget to vote on the post that helped you.
|
|
|
|
|
i want to create a feild in sql server2005 database table during runtime using c# web application coding
|
|
|
|
|
Is there a way to reorder leaf nodes in treeview like drag&drop but i do not want to use third party controls? Can i simulate drag&drop with buttons? My treview is bind to XMLDataSource Data property and hierarchical table in SQL database. When i reorder nodes i must save that in database to.
|
|
|
|
|
Hi friends,
I am familiar in Asp.net. I have a php script code for flash uploading. I need to convert this php script to java script. For ur's reference i put the code below,
include("JSON.php");
$result = array();
if (isset($_FILES['photoupload']) )
{
$file = $_FILES['photoupload']['tmp_name'];
$error = false;
$size = false;
if (!is_uploaded_file($file) || ($_FILES['photoupload']['size'] > 2 * 1024 * 1024) )
{
$error = 'Please upload only files smaller than 2Mb!';
}
elseif (!$error && !($size = @getimagesize($file) ) )
{
$error = 'Please upload only images, no other files are supported.';
}
elseif (!$error && !in_array($size[2], array(1, 2, 3, 7, 8) ) )
{
$error = 'Please upload only images of type JPEG.';
}
elseif (!$error && ($size[0] < 25) || ($size[1] < 25))
{
$error = 'Please upload an image bigger than 25px.';
}
else {
move_uploaded_file($_FILES['photoupload']['tmp_name'], "./uploadedfiles/".$_FILES['photoupload']['name']);
chmod("./uploadedfiles/".$_FILES['photoupload']['name'], 0777);
}
$addr = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$log = fopen('script.log', 'a');
fputs($log, ($error ? 'FAILED' : 'SUCCESS') . ' - ' . preg_replace('/^[^.]+/', '***', $addr) . ": {$_FILES['photoupload']['name']} - {$_FILES['photoupload']['size']} byte\n" );
fclose($log);
if ($error)
{
$result['result'] = 'failed';
$result['error'] = $error;
}
else
{
$result['result'] = 'success';
$result['size'] = "Uploaded an image ({$size['mime']}) with {$size[0]}px/{$size[1]}px.";
}
}
else
{
$result['result'] = 'error';
$result['error'] = 'Missing file or internal error!';
}
if (!headers_sent() )
{
header('Content-type: application/json');
}
echo json_encode($result);
?>
In the above code a temporary file created and the uploaded files are stored in that folder.I need to convert this code in javascript.
I hope ur's reply
Thanks
Every Successful Person Have A Painful Story
|
|
|
|
|
You would be better of posting this on a javascript forum
Also php is server side language and javascript is client side, how are you going to convert that?
|
|
|
|
|
Hi All,
How can I open a new popup windoe on the click of the hyperlink in an popup window.
When I tried opening a new popup window form another popup window, it opened the popup window in the same window and not a new one.
Please help.
|
|
|
|
|
|
HI,
I am a web developer. I need to build search engine for my web page where user enter keyword for search .If user enter "m" it will show previous all keywords of m from the database in a pop up window below the search text box.
Please anyone could help me to solve the problem.
|
|
|
|
|
M. K. BASHER wrote: Please anyone could help me to solve the problem.
Use AJAX Autocomplete Extender control.
Search in google for sample code.
please don't forget to vote on the post that helped you.
|
|
|
|
|
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
|
|
|
|
|