|
HI all
I have given a problem set in which i need to parse an xml document of size near about 1GB. In which the it should able to Parse/Load/Search the xml document in efficiently .
Now please anyone help me how to go for this means which are possible way and which is better PLease help me
|
|
|
|
|
Hi All,
I am working on PowerPoint Automation. I have an image stored in the database which I have to insert in ppt slide. Can anybody give me some pointer or sample code how to do this?
I am using the following piece of code
objSlide.Shapes.AddPicture(fn,Microsoft.Office.Core.MsoTriState.msoFalse,Microsoft.Office.Core.MsoTriState.msoTrue,380,200,0,0);
where fn is the name of the file.
But i can not see the image in the slide.
Thanks,
Avanika
|
|
|
|
|
hi ,
I need to change only one column datatype of a datatable and remaining records and datatypes as it is.
I have one datatable filled up with data records , i need same records in another datatable with only one column of price with changed datatype of int from string .
datatable.copy() and clone () doesnt work caz they also copy structure of the original datatable.
plz help.
regards,
max
|
|
|
|
|
i think v cant able to change the datatype of an datatable(if there is any data rows in it), so u just create a new datatable and write a code to create the table and move the records to that new DataTable
Raja
|
|
|
|
|
When I add a Crystal Report in a Visual Basic 2005 Project it is loaded together with its .vb source file but when I add it to an ASP.NET Project there is no source file. Could somebody explain to me why this is so?
|
|
|
|
|
hi
is there any function to convert mysql string datatype to int datatype.
I need to search data records from a table between certain price values.now this price values are stored in mysql as varchar type. And I need to compare it with certain price range which obviously is double or int type,
but how can i compare int and string . it gives error.
any help is appreciated,
thx,
max
|
|
|
|
|
How can i access starting index of selected text in label control using javascript.
kamalnath
|
|
|
|
|
Hope this is useful for you
var txt = '';
function getSelText()
{
var txt = '';
if (window.getSelection)
{
txt = window.getSelection();
}
else if (document.getSelection)
{
txt = document.getSelection();
}
else if (document.selection)
{
txt = document.selection.createRange().text;
}
else return;
}
alert(txt[0])//This line is to get starting index of selected text
|
|
|
|
|
Hi All
Can anyone guide me is the below approach is correct or not....
I am writing my max html code in my class file (Business layer) and return simple string to presentation layer. Normally i am doing this type of coding where i need my html to be build on the basis of return values from database.
E.g. I want to show hyperlink on a page if count(*) from table is greater than zero otherwise display “Not Available”. So my coding apprach is as below
strheader = "<br><br><font class=content> <STRONG>" + "More Images" + "</font> <br>"
sProdDescString3 = sProdDescString3 + strheader
If PrdMoreImageDataTable.Rows.Count = 0 Then
sProdDescString3 = sProdDescString3 + "Not Available"
Else
sProdDescString3 = sProdDescString3 + "<a href=# onclick=OpenWindow(a.htm);>Show Me</a>"
And in UI layer do simply as <%= sProdDescString3%> on appropriate location
Please guide me, is this approach is correct or some ……(
Amit
|
|
|
|
|
All HTML code should be in the presentation layer, not in the business layer.
---
b { font-weight: normal; }
|
|
|
|
|
Yes it makes sense.
One way to achieve is using span element in the presentation layer and then setting the InnerHtml property in class file according to the condition. e.g.
this.objSpan.InnerHtml = "";
Thanks,
Avanika
|
|
|
|
|
I'm just curious when I grab a connection string from my Web.config file using, say, WebConfigurationManager...
string connectionString = WebConfigurationManager.ConnectionStrings["myDatabase"];
...is the xml from the web.config file being read and parsed each and everytime this method is called? Or does is load the web.config and all it's settings into memory?
If it is reading the file each time, would it be faster to place the connection string into the Application Cache and read it from there?
Cheers!
Sunday Ironfoot
www.dominicpettifer.co.uk (work in progress)
|
|
|
|
|
Yes you are right,web.config is parsed each and everytime and your method will be called.This will show impact on performance so you can use cache memory to hold the connecton string.
Dont forget to set the expiry policy for that cache item,
i prefer file based expiry policy so that when web.config is changed then cache item get refreshed.
|
|
|
|
|
Interesting, if it is parsing the xml file each time it's doing it really quickly, far more efficiently than I thought. For instance if I do something like the follow code...
for (int i = 0; i < 1000; i++)
{
connectionString =
WebConfigurationManager.ConnectionStrings["default"].ConnectionString;
}
...it's going to parse the xml file 1000 times and cause the page execution to hang for a bit, except my page execution time is about 0.015 seconds. Also if I add a Thread.Sleep(1) inside the for loop the page execution jumps to about 2 seconds (1 second for Thread.Sleep(1) x 1000 plus any overhead from Thread.Sleep() method) meaning it's not my page timer thats not timing properly or anything.
Are you sure it's reading the web.config file each time and not just reading the settings from memory? Or have I way overestimated the overhead of parsing through xml?
Sunday Ironfoot
www.dominicpettifer.co.uk (work in progress)
|
|
|
|
|
So I have a very simple webpage (see below). When I click on the first button it posts back and updates the value with in the text box just fine, and same with the second one. But if I click on the first button then immediately click on the second one, so that they are both posting back at the same time, it will come back and fill in the data for the firs textbox, after the Thread.Sleep() has completed, then it will blow out the value in the first textbox, and set the value for the second value.
So it looks like it grabs the currect viewstate of all of the controls that have "AutoUpdateAfterCallBack" turned on, and there for when the callback is complete it will reset all of the fields, then update the value(s) that you wanted set.
Does anyone know how to get this example to work properly with the latest version of Anthem.Net? I only want it to update the fields that I actually modified with in the server side code.
[HTML Code]
<form id="form1" runat="server">
<div>
<anthem:TextBox ID="txt1" runat="server" EnableCallBack="true" AutoUpdateAfterCallBack="True"></anthem:TextBox>
<anthem:Button ID="btn1" runat="server" Text="Ajax w/Sleep" EnableCallBack="true" TextDuringCallBack="Processing..." EnabledDuringCallBack="false" />
</div>
<div>
<anthem:TextBox ID="txt2" runat="server" EnableCallBack="true" AutoUpdateAfterCallBack="True"></anthem:TextBox>
<anthem:Button ID="btn2" runat="server" Text="Ajax w/Sleep" EnableCallBack="true" TextDuringCallBack="Processing..." EnabledDuringCallBack="false" />
</div>
</form>
[Code Behind]
Partial Class Default
Inherits System.Web.UI.Page
Protected Sub btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
txt1.Text = "Hello World"
Threading.Thread.Sleep(1000)
End Sub
Protected Sub btn2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn2.Click
txt2.Text = "Hello World"
Threading.Thread.Sleep(1000)
End Sub
End Class
-- modified at 18:43 Thursday 14th September, 2006
I'm using Anthem.Net v1.3.2 with VS.Net 2005 Pro.
|
|
|
|
|
For anyone that is interested, I found the solution to my problem.
Instead of setting the "AutoUpdateAfterCallBack" property in the HTML code, you would instead set it after you've updated the value for the text field, for example:
Partial Class Default
Inherits System.Web.UI.Page
Protected Sub btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
txt1.Text = "Hello World"
txt1.UpdateAfterCallBack = True
Threading.Thread.Sleep(1000)
End Sub
Protected Sub btn2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn2.Click
txt2.Text = "Hello World"
txt2.UpdateAfterCallBack = True
Threading.Thread.Sleep(1000)
End Sub
End Class
That way the auto updating functionality of Anthem.Net will only update the specific field(s) that you set to update after the callback has occured.
|
|
|
|
|
I am using PUSH method to view data by crystal report. but i trying to export data in any format (i.e PDF) then i m getting error .. Logon fail
i dont know why this is happening ..
any suggestion please
thanks in advance
|
|
|
|
|
Imports System.Web.Services
<WebService("http://www.FL.com/SimpleHelloWorld/", "A simple web service which display message.")> _
Public Class HelloWorld
Code here
End Class
Getting error
c:\inetpub\wwwroot\WebService1\HelloWorld.asmx.vb(2): Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.
But i place underscore....
Amit
|
|
|
|
|
Maybe it's the line between the attribute and the class declaration.
Another thing I see, it's an illegal character that is not visible in the designer, try to delete and retype it to see if there is any change.
|
|
|
|
|
<WebService(Namespace="http://www.FL.com/SimpleHelloWorld/", Description="A simple web service which display message.")> _
.....
Hope this helps.
|
|
|
|
|
Kumar, removing the blank line after <webservice(namespace="http: www.fl.com="" simplehelloworld="" ",="" description="A simple web service which display message." )=""> _ will hopefully solve your problem.
|
|
|
|
|
Is Cache class available to App_Code folder too.
Because in my Global.cs which resides in App_code, If i use Cache["test" = "testvalue"; am getting a compiler error saying 'System.Web.Caching.Cache' is a 'type' but is used like a 'variable'
can anyone help
|
|
|
|
|
Context.Cache["test"] = "testvalue";
only two letters away from being an asset
|
|
|
|
|
Hey Guys
It is almost more than year I am working on dot.net, but unfortunately I never get the chance to work on hot technology like web service…
I am planning to learn myself so please suggest some good sites from where I can start. Specially with SOAP model…..I search some sites and maximum are for intermediate level…
Please suggest some good links from where I can get good exposure for web service with SOAP
Amit
|
|
|
|
|