天道酬勤,学无止境

vb.net

how to call javascript function from vb.net code?

I have written VB.NET code for calling my Javascript function showDisplay(). vb.net code: System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "Script", "showDisplay();", True) javascript code: function showDisplay(){ alert('success');} but this is not working, can you help?

2021-06-14 15:33:55    分类:问答    javascript   vb.net

What happens if I use a font that isn't installed on the client machine?

Can someone tell me what happens if I use a font in my WinForms app that isn't available on the target machine? Does it use a font in the same family, just Sans Serif, or something else?

2021-06-14 15:17:43    分类:问答    vb.net   windows   winforms   visual-studio-2010   fonts

Using overloaded VB.NET Not operator from C#

I have a VB class which overloads the Not operator; this doesn't seem to be usable from C# applications. Public Shared Operator Not(item As MyClass) As Boolean Return False End Operator I can use this in VB.NET: If Not MyClassInstance Then ' Do something End If I am trying to us this in a C# application but it won't build. if (!MyClassInstance) { // do something } I get the error Operator '!' cannot be applied to operand of type 'MyClass' Can anyone tell me what I am missing?

2021-06-14 14:15:43    分类:问答    c#   .net   vb.net   operator-overloading

How to create HTML fieldset and legend in asp.net code behind?

How to create HTML fieldset and legend in asp.net code behind? and add controls in that fieldset?

2021-06-14 12:16:17    分类:问答    c#   asp.net   vb.net

How do I type literal binary in VB.NET?

How do you type binary literals in VB.NET? &HFF // literal Hex -- OK &b11111111 // literal Binary -- how do I do this?

2021-06-14 12:10:22    分类:问答    vb.net   binary   literals

How to have a function run a callback in VB.net

I'm afraid I have been Googling this, but can't find an answer that I understand, or can use. In Javascript, you can run a function and set a callback function which it calls after the first function has run: function doThis(callBack){ // do things // do things if(callBack){ callBack(); } } Call this by: doThis(function () { alert("done") }); So after it's finished doing things it calls an alert to tell you it's done. But how do you do the same server-side in VB.NET?

2021-06-14 11:14:59    分类:问答    asp.net   vb.net   callback

Running a code behind routine from an <a href

I have a link that looks like a button from this html <p class="link-styleContact"><a href="#"><span>Email Contact Form</span></a></p> can I run a code behind file when this is clicked on by adding the routine name to the href? like below <p class="link-styleContact"><a href="ContactFormClicked" runat="server"><span>Email Contact Form</span></a></p>

2021-06-14 09:12:14    分类:问答    asp.net   vb.net

What is equivalent to Microsoft.VisualBasic.Collection in c#?

I have a method which takes a stored procedure name and a Microsoft.VisualBasic.Collection? I am referencing a vb project in which I have to pass in a collection to this method, but the current project I am in is in c#, so I am unclear what I can pass into the method? Here is the vb call: public void CallStoredProc(string spName, Microsoft.VisualBasic.Collection params); In my c# app, I need to call this an pass in the appropriate c# object to params.

2021-06-14 09:08:47    分类:问答    c#   vb.net

#warning directive in VB.net

I know the #warning directive does not exist in vb.net... is there anything like it? I want to be able to throw messages (warnings) at compiler time.

2021-06-14 08:57:16    分类:问答    .net   vb.net   preprocessor   compiler-directives

Adding the CANONICAL tag to my page for SEO through code behind?

I am using ASP.NET with MasterPages. Thus i cant just place this link in my pages that reference my MasterPage. <link rel="canonical" href="http://www.erate.co.za/" /> I need to place this link in though my Page Load of each one of my pages. How would i do this through code? I am using VB.NET but C# will also help me in the right direction. This is how i did it for my DESCRIPTION tag in my code behind. Dim tag As HtmlMeta = New HtmlMeta() tag.Name = "description" tag.Content = "Find or rate any company in South Africa for FREE and rate them" Header.Controls.Add(tag) Thanks in advance!

2021-06-14 08:02:34    分类:问答    c#   asp.net   vb.net   seo