|
HI,
Can we add 2 datatables in one dataset, each datatable from different database. If so, how we can add at a time.
Suppose if i get the datatable using sqlserver database then
dataset1 = sqldataset.tables[0];
If i get the datatable from Oracle database then
dataset1 = oradataset.tables[0];
is it correct? if so, it doesn't overwrite?
G. Satish
|
|
|
|
|
Hi,
DataSet ds = new DataSet();<br />
ds.Tables.Add(dataTable1);
ds.Tables.Add(dataTable2);
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
DataSet1 ds1 = new DataSet();
ds1.Tables.Add(dt1); // from 1st database i.e from SQL
ds1.Tables.Add(dt2); // from 2nd database i.e from Oracle
If you want more info check in google
Thanks & Regards
Niranjan
|
|
|
|
|
Hi All,
in my company we are working with asp. we have web server installed with the ASP project. we are using visual studio interdev. we will create a local instance for that wesite in the web server.my problem now is how can i integrate the files with VSS(Visual SourceSafe). that is when i check out the file in my machine others should not be able to check out or modify the file.
Urgent please help.
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Hi vimal_yet,
Install VSS 2005
In the left panel of VSS add project
Set working folder where your working folder exsits.
Then add files in this vss folder.
|
|
|
|
|
That's Fine.
i have done it. when i check-out a file in the project .it has to check out in VSS also..
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
HI,
Recently i faced this question in one of the interview. i need solution for this.
Question is :---
If you have webpage and have a requirement to add more than 200 controls like labels, textboxes, dropdownlists etc.....How you manage this page.
Webpage containing more than 200 controls means its processing to server everytime page requests. How you manage this page?
G. Satish
|
|
|
|
|
Instead of server controls i preferd to use HTML controls, becoz it does not required parsing of ASp.net control tags to HTML tags which saves lot of processing n time.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
sulabh2020 wrote: becoz it does not required parsing of ASp.net control tags to HTML tags which saves lot of processing n time.
So, you are going to write the code in Javascript?
|
|
|
|
|
Satish wrote: How you manage this page.
Don't you ask what he/she meant by "How you manage this page"?
Satish wrote: Webpage containing more than 200 controls means its processing to server everytime page requests
It's very strange. How come "Webpage containing more than 200 controls" means "its processing to server everytime page requests"? No matter how many controls you have in a particular page. If you don't submit anything then there won't be any postback..
|
|
|
|
|
Hi,
I am fillilng a dropdown list which is inside a updatepanel through a button click event. But after clicking the button again to fill the dropdown , only the updateprogress moving icon gets displayed. i think the page hangs.
i am binding 50,000 records . fetching it from database. i tried doing without updatepanel. its working fine. after including updatepanel and updateprogress controls and then clicking the button second time it hangs.
my code
=======
aspx page
========
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="tbl" runat="server" width="95%" style="border-width:1px; border-color:lightblue; border-style:solid">
<tr>
<td><asp:DropDownList ID="ddlCat" runat="server"></asp:DropDownList>
<%--<asp:TextBox ID="txt" runat="server"></asp:TextBox>--%>
</td>
</tr>
<tr style="height:10px"><td><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></td></tr>
</table>
</ContentTemplate>
<%-- <Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click"/>
<asp:PostBackTrigger ControlID="ddlCat" />
</Triggers>--%>
</asp:UpdatePanel>
<asp:UpdateProgress AssociatedUpdatePanelID="UpdatePanel2" ID="UpdateProgress1" runat="server" DisplayAfter="1" Visible="true">
<ProgressTemplate>
<iframe frameborder="0" src="about:blank" style="border:0px;position:absolute;z-index:9;left:0px;top:0px;width:expression(this.offsetParent.scrollWidth);height:expression(this.offsetParent.scrollHeight);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=75, FinishOpacity=0, Style=0, StartX=0, FinishX=100, StartY=0, FinishY=100);"></iframe>
<div style="position:absolute;z-index:10;left:expression((this.offsetParent.clientWidth/2)-(this.clientWidth/2)+this.offsetParent.scrollLeft);top:expression((this.offsetParent.clientHeight/2)-(this.clientHeight/2)+this.offsetParent.scrollTop);">
<table>
<tr>
<td><img src="Images/loading_animation_liferay.gif" /></td>
<td style="font-family:Tahoma;color:Red">Loading Please Wait...</td>
</tr>
</table>
<br />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
=============
aspx.cs page
============
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection(connectionString);
SqlDataAdapter sqlda = new SqlDataAdapter("select top 50000 * from abc", connectionString);
sqlda.Fill(ds, "cat");
ddlCat.DataSource = ds.Tables["cat"];
ddlCat.DataValueField = "id";
ddlCat.DataTextField = "id";
ddlCat.DataBind();
}
|
|
|
|
|
Hi,
I think its really a very bad idea to bind these many records to Dropdown...
Whats yr purpose to bind to Dropdown ?
You wanna give user selection from these many records ?
Its really bad.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
but even if i reduced it to 5000 records the same thing is happening.
if i reduced it to 1000 records, then it gets filled in a second. but then there is no use of updatepanel and updateprogress controls.i want to fetch many records so i am using updatepanel and updateprogress controls.
|
|
|
|
|
Hi,
There will not be any effect using update panel in that.
But whats the purpose to fetch these much data in DropDown ?
It seem that your idea is really bad.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi,
actually, i have got a page. when a user selects a records in a drop down and then he clicks a submit button. after clicking the button the page takes times to process and then it transfers to the next page. before tansfering, the selection page is getting displayed and i dont want the user to click the button again. so i am showing the updateprogress icon till the process gets complete.
Thanks
|
|
|
|
|
hi,
normally i am binding a dropdownlist inside a updatepanel. when i click the button event is fired. it shows updateprogress icon and the dropdownlist is filled. when i click the button second time it takes more time to get filled.
i observed that when i bind few thousands records to the dropdown and click the button for the second time to fill the dropdown it takes much less time. but when i increase the number of records to say above 10000 it does not hang but it takes more time to get filled on the second time when the button is clicked
|
|
|
|
|
I am using server.transfer to take data from one page to the other. I have bunch of text boxes with data and I am transfering to a new page with server.transfer. The problem is I am having a sum textbox in the first page, the contents of which i don't want to transfer. Anybody can help me how to do it..
Raj D
|
|
|
|
|
You put that sum in the Session variable. and get this value at the end...
|
|
|
|
|
is it possible to limit the no of line in asp.net textbox????????
i have the problem on this........
rajan
|
|
|
|
|
rajanandal wrote: is it possible to limit the no of line in asp.net textbox????????
I afraid, you can't.
But you can limit no. of letters using MaxLength property of the TextBox control. And you can use JavaScript to do the job on clientside.
|
|
|
|
|
Testbox size can be limited when its mode is "singleline" while if the the mode is multi line you use RegularExpressionValidator> i have mentioned the the re for the textarea.
<asp:RegularExpressionValidator ID="revMaxDescription" runat="server" ControlToValidate="txtDescription"
ErrorMessage="Test cannot be greater than 100 characters." ValidationExpression="(.|\n){0,100}"/>
|
|
|
|
|
private string ToSentenceCase(Match match)
{
return match.Value[0].ToString().ToUpper() +
match.Value.Substring(1);
}
string text = Regex.Replace(TextBox.Text, @"\w+", ToSentenceCase);
and in return function wat i have to send
|
|
|
|
|
jagadeeshkumar2106 wrote: private string ToSentenceCase(Match match)
{
return match.Value[0].ToString().ToUpper() +
match.Value.Substring(1);
}
string text = Regex.Replace(TextBox.Text, @"\w+", ToSentenceCase);
Private Function ToSentenceCase(ByVal m As Match) As String
Return m.Value(0).ToString().ToUpper() & m.Value.Substring(1)
End Function
Dim text As String = Regex.Replace(TextBox.Text, "\w+", AddressOf ToSentenceCase)
|
|
|
|
|
hi venky it is working fine thanks to u ...how i can covert the text the user what ever he enters into lower case is ti possible with this or any thing there
|
|
|
|
|