|
Dim strfldRankNew As Int32 = RTrim(LTrim(e.NewValues("fldRank")))
LTrim and RTrim cut off leading and trailing blanks from a string. They return a string. Not an Int32. You could use Int32.Parse() - better use If Int32.TryParse()... and show a useful error message to the user when it fails!
|
|
|
|
|
Member 9328847 wrote:
Dim sSql As XElement
sSql = <sql>
Update [tblOncallAnalystSchedule]
SET [fldOnCallGroup] = '<%= fldOnCallGroup %>',
...
</sql>
SendSQLCommand(sSql.Value, sqlConn)
Using an XElement to build your dynamic query won't prevent SQL injection[^]. You need to use a parameterized command instead.
Also, your code is trying to execute exactly the same query that's set for the UpdateCommand of the SqlDataSource control. If you remove the event handler, the control will perform the update for you.
Finally, the MsgBox calls will never work; if they did, the message box would appear on the server, where nobody would ever see them, and your page would be stuck waiting for someone to click "OK".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
i want to ask about google analytics, is it ok to keep the script in the site.master's <head> or i have to put it in every individual page?
|
|
|
|
|
Yeah it's okay.
No more Mister Nice Guy... >: |
|
|
|
|
|
Debes colocarlo en el master.page de tu sitio. En la sección ...
_______________________
Edward J. Ocando. | Desarrollador | SoyDesarrollador.net
Telefono. +58 (416) 164.34.88 | Edward.Ocando@soydesarrollador.net
|
|
|
|
|
I want a video player for my website, that is capable of playing all forms of videos from database. Can anyone suggest me name of source code for the same.
|
|
|
|
|
|
Hi. I am using Microsoft Chart control (.Net 3.5) for a report. Its working good. But when my label text is too long, its not showing full text. Is there any text wrap property in MS Chart Control or please advise me how can it would be done.
|
|
|
|
|
|
I use model view presenter approach for ASP.NET web site. The presentation part is compiled in separate class library where view contracts and presenters are defined:
MyPresentation assembly
IMyView
{
DisplayText(string text);
}
MyPresenter
{
public IMyView View { get; set; }
public DisplayText()
{
string text = Generate();
View.DisplayText(text);
}
}
MyWebApplication assembly
public partial class MyForm : System.Web.UI.Page, IMyView
{
public void DisplayText(string text)
{
this.myLabel.Text = text;
}
...
protected void myButton_Click(object sender, EventArgs e)
{
Presenter.DisplayText();
}
}
However after stepping out of Presenter.DisplayText() Text property of myLabel becomes null again as though no assignment were done. By all means if you replace the only line in myButton click event with direct setting of myLabel Text property everything stays assigned.
Чесноков
|
|
|
|
|
And what is doing method Generate()?
No more Mister Nice Guy... >: |
|
|
|
|
|
returns string of letters
Чесноков
|
|
|
|
|
I am asking because I am trying to work out something. But... huh whatever.
I would say that you just setting text in another instance.
No more Mister Nice Guy... >: |
|
|
|
|
|
Hello
I have a new requirement as follows. Its an webapplication depends on external systems and sqlserver to pull and push data. We have to develop that app both in ASP.NET Web application and for an IPAD. UI will be almost same for both ASP.NET web application and for IPAD.
So can any body suggest me the best possible ways so that some core business logic can be reused for both Webapplication and for IPAD
|
|
|
|
|
I would recommend ASP.NET MVC 4 which is perfect for web and mobile platforms.
Regards,
Jon
|
|
|
|
|
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.
|
|
|
|