|
When I read your question I have to think of something I encountered.
My problem had to do with a limitation of Datasets. When the data exceeds about 100mb an 'out of memory' exception is thrown.
So if you use a Dataset to read/write the data, then the answer is probably to do this without using a dataset.
|
|
|
|
|
that's exactly what my problem is ,i am unable to find a control which can hold huge data upto 200 mb.as i want to pass it as an parameter into the database, i have to send the data as a parameter,kindly suggest me what i should do.
|
|
|
|
|
suppose i have three gridview on my page one after another and will display three different info like books detail,moview details and games detail. i want that when page will be displayed then my three different gridview will populate at a time idependly and when three busy indicator will be shown for three different gridview. which one will be polated first then busy indicator for that grid will be invisible. i want to do it using MS-ajax. please guide me how can i do it.
tbhattacharjee
|
|
|
|
|
You can use threads to fetch data for the different grids. Threads were independently and you can use ajax to show busy indicator.
S Kumar
|
|
|
|
|
I am working on screen scraping application, I have one webpage and web page as an iframe control , and iframe internally has one text area control, but the iframe and text area control were rendered by using the javascript file, Now my requirement is how can I assign the value to the text area control from the .cs (i.e from the code behind)
|
|
|
|
|
I am working on screen scraping application, I have one webpage and web page as an iframe control , and iframe internally has one text area control, but the iframe and text area control were rendered by using the javascript file, Now my requirement is how can I assign the value to the text area control from the .cs (i.e from the code behind)
|
|
|
|
|
suppose i have many multi line text boxes on my web form one after one. i want to block any multi line text box using modal popup extender. is it possible. i want to block in such a way modal popup will display on target input control with the same height,width and left, top of the target control. if i can do it so in this way we can block multi line text box for entering something. i know there are many way to block input control but i want to block this way. plzz anyone help me with sample code.
thanks
tbhattacharjee
|
|
|
|
|
in VS 2008 IDE when i am trying to drag the control then control is not being positioned where i want to place. so please tell me what to do to fix this problem. i am new in VS2008 IDE.
tbhattacharjee
|
|
|
|
|
Is it perhaps "jumping" to align with another control? Or is it inside of some flow control that determines where its children are positioned?
If not, you can always position it precisely with the arrow keys or by typing the position in the properties.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Hi tridip
Here in vs 2008 you can not move control directly by selecting it,,, to move controls you just click the lines of a control in left corner then move to left or right ,if you want to move top or down positions you have to click on left top corner lines then drag the position where you want.
Hope you understand the answer..
|
|
|
|
|
here i generate a div from javascript and position over the text box.
i found two problem
1) my code is working only for IE.
2) text inside in div is not getting positioned vertically center.
here is my code.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
var modalWindow = null;
function drawDiv()
{
var txt = document.getElementById('TextBox1');
var dime = new Dimension(txt);
modalWindow = document.createElement('div');
modalWindow.style.position = 'absolute';
modalWindow.setAttribute("align", "center");
modalWindow.setAttribute("vertical-align", "middle");
modalWindow.innerHTML = '<p>hello...</p>';
modalWindow.style.left = dime.x;
modalWindow.style.top = dime.y;
modalWindow.style.width = dime.w;
modalWindow.style.height = dime.h;
modalWindow.style.backgroundColor = '#C0C0C0';
document.body.appendChild(modalWindow);
return false;
}
function hider(whichDiv)
{
document.getElementById(modalWindow).style.display = 'none';
}
function Dimension(element)
{
this.x = -1;
this.y = -1;
this.w = 0;
this.h = 0;
if (element == document)
{
this.x = element.body.scrollLeft;
this.y = element.body.scrollTop;
this.w = element.body.clientWidth;
this.h = element.body.clientHeight;
}
else if (element != null)
{
var e = element;
var left = e.offsetLeft;
while ((e = e.offsetParent) != null)
{
left += e.offsetLeft;
}
var e = element;
var top = e.offsetTop;
while ((e = e.offsetParent) != null)
{
top += e.offsetTop;
}
this.x = left;
this.y = top;
this.w = element.offsetWidth;
this.h = element.offsetHeight;
}
}
</script>
</head>
<body>
<div>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server" Height="180px" Style="left: 307px; position: relative;
top: 264px" TextMode="MultiLine" Width="432px"></asp:TextBox>
<asp:Button ID="Button1" runat="server"
Text="Button" OnClientClick=" return drawDiv()" />
</form>
</div>
</body>
</html>
please run this code and make it cross browser. also tell me why the content in div is not vertically centered.
thanks
tbhattacharjee
|
|
|
|
|
i want to generate a div dynamically from javascript and position over the multi line textbox. i want that div left and top will be just the left and top of the multi line textbox and the same way div's width & height will be same like multi line textbox and div will have some text like loding....
how can i do it writing a javascript which will be cross browser. please help me with code.
thanks.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: i want to generate a div dynamically
You can create a new div, or other way you can have a div design time in display:none state,Now whenever you require,just change the display property and set the top and left property and also height and width.
For that you require , the position of the multiline textbox ( which renders as textarea) and set it to the div.
|
|
|
|
|
thanks for reply but it would be better if u provide some code for my requirement.
thanks.
tbhattacharjee
|
|
|
|
|
The below code gives you the position of an object passed
function findPosition(obj)
{
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return [curleft,curtop];
}
pass the DOM object to findPosition and get the position of the textarea.
Now set the top and left with this position.
Also set the width and height of the div as your textarea.
|
|
|
|
|
Hi, every one. I am new in MVC and just practicing to improve my knowledge.I have the following codes and trying to pass data to GridView. but I get error after running the page.
Its my PersonController
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using MvcApplication1.ViewModels;
using MvcApplication1.Models;
namespace MvcApplication1.Controllers
{
public class PersonController : Controller
{
HostelEntities1 HostelDB = new HostelEntities1();
public ActionResult Index()
{
var Persons = from peson in HostelDB.Person_prs
select peson.fname_prs;
var ViewModel = new PersonIndexViewModel
{
Person = Persons.ToList(),
NumberOfPeople= Persons.Count()
};
return View(ViewModel);
}
}
}
Its my ViewModel Class. I have class called PersonIndexViewModel
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MvcApplication1.ViewModels
{
public class PersonIndexViewModel
{
public int NumberOfPeople { set; get; }
public List<string> Person { set; get; }
}
}
and finally in View folder I have the following code
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.ViewModels.PersonIndexViewModel>" %>
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Index
</asp:Content>
<script type="text/C#" runat=server>
protected void Page_Load(object sender, EventArgs e)
{
this.GridView1.DataSource = this.Model.Person;
this.GridView1.DataBind();
}
</script>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>This Page List Name Of People</h2>
<p>select from<%=Model.NumberOfPeople%></p>
<ul>
<%foreach (string NamePeople in Model.Person)
{ %>
<li>
<%=NamePeople%>
</li>
<%} %>
</ul>
<asp:GridView ID="GridView1" runat="server" Width="50%" EnableViewState="False"
DataSourceID="EntityDataSource1">
</asp:GridView>
<asp:EntityDataSource ID="EntityDataSource1" runat="server">
</asp:EntityDataSource>
</asp:Content>
after running I face with this error
<br />
Control 'ctl00_MainContent_GridView1' of type 'GridView' must be placed inside a form tag with runat=server.<br />
Could yo please help me out.
modified on Sunday, November 14, 2010 8:15 AM
|
|
|
|
|
|
Relatively new to asp.net. I want to develop a page that uses an AJAX Tab Panel Control. Based on the tab, the user selects, a filter is applied to the result set shown on a grid. I'm wondering if I should just have the tabs display without showing anything in the tab itself, or develop a custom control (.ascx) which I would include on the tab, thus I'm writing code once instead of having a unique grid on every tab.
If I use the custom control and have the grid on the tab, how do I access controls on the .aspx page? Simple example. I have a label on the .aspx page which displays messages, based on what someone is doing on the grid. If the grid is in the .ascx, how do I access the label in the .aspx?
|
|
|
|
|
Just wonder is it a good practice to host web site and web services in the same app pool and same virtual directory ?.
The asp.net web site will call the business facade directly and the web services will host the business facade for others .net application.
|
|
|
|
|
kakarato wrote: Just wonder is it a good practice to host web site and web services in the same app pool and same virtual directory
It's better if assign both web services and web application, different application pool.Because if you are consuming your web services from multiple applications, then if your app pool gets down due to web application problem, your webservices will also be down. And rest other other application will not be able to use it.
But if webservices is just consumed by one application, then you can deploy in same application pool
|
|
|
|
|
Hi All,
I am using asp.net MVC 2 and am having an issue running two getJSON commands at the same time.
However I try to re-arange the code the second one waits for the first one to finish before runnning. Consider this code as an example.
var InProgress = false;
function Start(){
InProgress = true;
DoSomething();
UpdateProgress();
}
function DoSomething(){
$.getJSON("url", {}, function(data){
InProgress = false;
$("#text").text("Complete");
});
}
function UpdateProgress(){
if(InProgress){
$.getJSON("url2", {}, function(data){
$("#text").text(data.Percent);
setInterval(UpdateProgress(), 500);
}
}
}
Basically, I am trying to get a progress report for the main process.
What is happening is...
Start() called
UpdateProgress() called
text updated
DoSomething() called
UpdateProgress() called (But only after DoSomething getJSON has finished)
The whole process runs for about 5 - 10 seconds so UpdateProgress should be called many more times.
Can anyone help with why this would happen? I cannot find anything on the web to help me out
Thanks
EDIT
--------
I have found what the problem is. I was using Session (assigning the progress value to) in the Actions that the getJSON commands called. And for some reason this was forcing the second getJSON to wait. Removed session references, problem fixed.
However my problem now is, what do I use instead of Session. I basically need to persist a variable value across multiple action calls. I understand that essentially for two action to run together then they must be on different threads somewhere along the line. So I guess that is the issue.
Any idea's cleaver people?
Life goes very fast. Tomorrow, today is already yesterday.
modified on Friday, November 12, 2010 11:54 AM
|
|
|
|
|
i found a serious problem that when i click on button then postback happen but i stopped the postback.
my code is follows. please see what is wrong in it.
-----------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function ShowDiv()
{
var modalWindow = document.createElement('div');
modalWindow.style.position = 'absolute';
modalWindow.style.height = '100px';
modalWindow.style.width = '100px';
modalWindow.style.left = (modalWindow.style.height - getDocHeight())/2;
modalWindow.style.top = (modalWindow.style.width - getDocWidth())/2;
modalWindow.style.backgroundColor = '#C0C0C0';
modalWindow.innerHTML = 'hello...';
document.body.appendChild(modalWindow);
return false;
}
function getDocHeight()
{
return Math.max(document.getElementById('TextBox1').style.height );
}
function getDocWidth()
{
return Math.max(document.getElementById('TextBox1').style.width );
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Style="left: 745px; position: relative;
top: 298px" Text="Button" OnClientClick=" return ShowDiv()" />
<asp:TextBox ID="TextBox1" runat="server" Height="180px" Style="left: 307px; position: relative;
top: 264px" TextMode="MultiLine" Width="432px"></asp:TextBox></div>
</form>
</body>
</html>
here ShowDiv() function return false. another thing i notice that when i comment all the line in function ShowDiv() then postback is not happening. i just do not understand if i generate a div and add to page from javascript then why postback happening.
please tell me the solution to avoid postback when i will generate div from any function. if possible please rectify my code.
thanks
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: another thing i notice that when i comment all the line in function ShowDiv() then postback is not happening.
This is happening because there is an error in your code. Once there is an error, return false; is not getting executed, that's why postback occurs.
The error is in lines
modalWindow.style.left = (modalWindow.style.height - getDocHeight())/2; modalWindow.style.top = (modalWindow.style.width - getDocWidth())/2;
here you are trying to like 180px-100px , so this is throwing an error. Get the height, remove px from the height then try, it will work
|
|
|
|
|
thanks a lot.
tbhattacharjee
|
|
|
|
|
Your welcome
|
|
|
|