|
I just finished an ASP.NET MVC 3 web site (MVC 4 has not been approved yet) that is compatible for both Internet Explorer on Windows and Safari on the iPad.
The key for making the web site compatible for both environments is avoiding any IE specific Javascript functions. Use jQuery as much as you can because it works great on both browsers.
|
|
|
|
|
Hi All,
I have web service that is developped using mainframe's natural language and wsdl created using some java's web server. I got the wsdl and using SOAP UI I have created a proxy .net class to add it in my application.
The proxy is connecting and getting the data, but after calling it for 2 or 3 times application is becoming too slow. It was not happening when I was not using the mainframe webservice proxy.
I am not understanding what is the reason and what's the cause for the slow. Do I have to close the connection and dispose the proxy object, I am not understanding. Please help me by giving some ideas or code snippets.
I am putting my code below
Proxy class constructor:
Public Sub New()
MyBase.New
'Me.Url = "http://localhost:7800/************V1WSDLSOAP_HTTP_Service"
Me.Url = "http://************EAI20:7810/EmployerAddress"
End Sub
And I am calling the proxy in the following way
listDOAccountStandards=AccountStandardObjectAdapter.GetAccountStandard(empl_accnt_no)
And I am not closing or disposing the proxy class any where (assuming that if once the scope of the execution finishes .net runtimes automatically frees the memory. As the proxy is managed code component)
Please help me by giving any kind of help.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
In c++, when you make a constructor, you have to make a deconstructor.
I would imagine it's the same in vb, and that the garbage collector is not capable of cleaning that up, managed code is not completely automatic, you may have to dispose and finalize.
Just off the top of my head, I don't see the need for a contstructor, just make a class and use it.
You should look up deconstructors for vb.
http://msdn.microsoft.com/en-us/library/2z08e49e%28v=vs.80%29.aspx[^]
|
|
|
|
|
|
Hi ,
I am not clear with the question dear, and the link provided is displaying session expired. what you wanted to do? can you please elaborate...
|
|
|
|
|
nregalndc.nic.in/netnrega/progofficer/poLoginframe.aspx?track=&state_code=29
this is the link for that
|
|
|
|
|
I have retreived the position of the dynamic controls in the hiddenfields (present in usercontrol) using javascript on the content page(.aspx) now I am willing to store their postions in to the viewstate (in user control) before base.SaveViewState(); and get the position of the controls from viewstate after base.LoadViewState(savedState); so that they may not loose their positions.
Any help will be appreciable.
|
|
|
|
|
Only answer that i can think of is: Why? What are you trying to do?
No more Mister Nice Guy... >: |
|
|
|
|
|
Why not just store the position in the DOM? and have the DOM do your work for you. elements just don't loose their positions, unless you move the element in the DOM, and want to return it back.
|
|
|
|
|
Dear can you just send me a example of that. So that i can get the clear picture of what you are suggesting. I'll highly obliged if you can do this favour to me.
|
|
|
|
|
When a browser makes a request for a web page, the html code is downloaded to the client, and stored in your computers memory by the browser, which is called the DOM. You can manipulate the DOM using Javascript, JQuery or Microsoft AJAX.
So in Javascript at the top of the page, you can make a global var like declaring variables in a class outside of the functions in c# or vb
var global_X = 0;
var global_Y = 0;
function getPosition() {
global_X = lalala();
global_Y = lalala();
}
function setPosition() {
}
|
|
|
|
|
Below is the details of what i'm trying to do.
Details:
I'm creating draggable panels making the use of Ajax DargPanelExtender.
DragPanelExtender & the Panel which i'm making draggable are in a usercontrol within a update panel.
Now, on the content page (.aspx page) I have a button & a Update panel. Within this update panel I'm adding usercontrol from code behind. (Note: Button is outside the update panel)
The draggable panels(usercontrol) added on the content page is working fine.
Earlier when I was creating the successive draggable panels on the click event of the button the previous draggable panels were disapperaring (or loosing) so I am re-creating the draggable panels(usercontrol) on OnInIt event which is also working fine.
On the Usercontrol I'm also having two hiidenfields for storing the x & y positions of the usercontrol respectively.
I'm retrieving the x & y positions of the usercontrol into the hiddenfields (present in the usercontrol) using javascript which I have registered on the aspx.cs page using RegisterClientScriptBlock. Which is also working fine I'm able to get the position of each usercontrol into the hiddenfields on onmousedown event( being fired while drag and drop) . Checked via populating the x & y positions present in the hiddenfields into a alert box.
Now, issue is that while I'm re-creating the usercontrols saved in a Generic type I want to set the Left and Top property of the control using the values present in the hiddenfields corresponding to each usercontrol as in the code below so that they may retain their positions on the AsyncPostBack
string hdfposX_val = "(" + controlToAdd.ID + "_hdfPosX"+").Value";
controlToAdd.Attributes.Add("style", "position:absolute;left:" +hdfposX_val+ "px" + ";");
which is not working.
(Note : each usercontrol and its containing hiddenfield controls are having unique ids viz.
usercontrol-> controlToAdd.ID = "usercontrol_" + Guid.NewGuid().ToString();
usercontrol_hiddenfield_position_X-> " + controlToAdd.ID + "_hdfPosX"+"
usercontrol_hiddenfield_position_Y-> " + controlToAdd.ID + "_hdfPosY"+")
Any help from your side will be appreciable.
|
|
|
|
|
I think your trying to fix something that doesn't need fixing.
The dragable panels should be created first and set in position.
Then the update panels should be inside the dragable panels, so use multiple update panels and multiple triggers.
Each draggable panels should be an independent unit, that is self contained, with all the plumbing inside them.
If you put the draggable panel inside a update panel, on async-postback, the server won't know that you changed the position of the panel, and put them back in the original location, where ever they were hard coded to when the server sent the html to the browser the first time.
So make the draggable panels first, test them. Then put a update panel inside the panel, and add your content and logic, then test again. It should work in theory.
I don't use update panels anymore, ditched them for javascript and web services. I also stopped using Microsoft Ajax extenders, in exchange for jquery and javascript instead.
|
|
|
|
|
Hi All,
I have a generic list of objects of class A. This class has a property called "addr_type_code", I want to sort the collection in such a way that from all of the collection. I want to put the item which has addr_type_code="BM" in the first place, and then item with addr_type_code="PL" in second place like that CL, QR ... etc. And some times some of the addr_type_code may miss and still our program should take the next one the priority and sort accordingly.
To make this arrangement possible and sort the list what is the best approach, please help me I want to sort it. Its very urgent.
Thanks,
Abdul
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
If you want ordrer it alphabetically with nullable values just use linq OrderBy function. If you want do this in multiple places write extension method with type argument TAClass:AClass. If you want some custom order implement in base class A ISortable (.net sorting interface i dont remember its name) interface with you custom sorting logic.
No more Mister Nice Guy... >: |
|
|
|
|
|
It looks big, is there any simple way to do the same?
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
|
i am using form view control and bind on runtime. is it shows only one record while i need to show all records in form view.
|
|
|
|
|
|
I have a textbox having textmode 'multiline' in which one can write source code, so my requirement is to make some part of textbox text to be read only and some part to be editable.....Suppose in a textbox there is 1 to 10 line(no of rows)... so i want row no.1 to row no.3 to be raedonly means no one can edit these rows, next row no.4 to row no.7 to be editable, and again row no.8 to row no.10 to read only.
How to achieve the above requirement... ??
Appreciates your reply and Thanks in Advance
|
|
|
|
|
I wouldn't be suprised if there is no solution using a textbox. This almost sounds like it would be better as a grid control. You can perform much finer access control in a grid.
Good luck.
|
|
|
|
|
I'll make the assumption that any line which can be edited cannot be broken into multiple lines...
Use JavaScript to listen for any change/key press/etc events. Also, use JavaScript to store the original text in an array (it will also store if a line is read only). Any time the text changes, check to ensure that any read only lines did not change. If they did, modify those lines so they are back to their original.
When the textbox is submitted back to the server, have your C# or VB.Net code do the same check as the JavaScript (in case the JavaScript was bypassed).
As somebody else mentioned, it would be much easier to use another control, such as a grid view (or repeater), to split each line into its own control. That will allow you, for example, to more clearly indicate which lines are editable and which are read only (e.g., by graying out the read only lines).
|
|
|
|
|
I would say better would be using one from tone of JS libs, and RegExp on server but it's just my opinion.
Also if customer would allow this with his browsers HTML5 masked textbox would be good solution to.
No more Mister Nice Guy... >: |
|
|
|
|
|
maybe you can create a new webcontrol,the textbox is not fit for your situation!
|
|
|
|
|