[RESOLVED] Create item template error

I am trying to create an email item from an outlook template using java script.

I am getting the following error:

Error: Cannot open file: \\prodsrv\inetpub\wwwroot\CP\cp2.oft. The file may not exist, you may not have permission to open it, or it may be open in another program. Right-click the folder that contains the file, and then click Properties to check your permissions for the folder.

Please help.

 

Outlook templates in the server cannot be accessed.

[RESOLVED] Opening Outlook templates using VB.NET

In a web application I want to open an email template and fill it with some dynamic values and show the email to the user before sending it.

How can I do it vb.net? I surfed the internet, but I couldn’t find anything useful. Most of them can be used only in Windows Forms , but not in Web Applications.

 

Hi

I tried that too. I am getting a "Outlook.NameSpace Not Defined Error."

Hi

When I tried the first solution, I get an error:

Cannot create ActiveX component.

When I tried the second one, the error is:

No application is associated with the specified file for this operation

I think it is because Outlook is not installed in our server. 

 

using javascript in the client will do.

[RESOLVED] ASP.Net dropdownlist tooltip does not work for items above selected item in IE

Hi,
Thanks in advance for all replies.

I want to show tooltip for all items in the dropdownlist "<asp:DropDownList"... I tried code-behind / javascript both approaches. i.e. adding "title" using x.Attributes.Add  OR  x.options[i].setAttribute by looping throgh all options..

The issue is, it doesn't show tooltip for items above selected item... However, it correctly shows tooltip for all items below selected item.

Also, tooltips works OK on other pages, but does not work on a perticular page.The view-source of the page shows that "title" has been correctly added to all options.

<select name="ctl00$cphWorkArea$ctrlLi$ctrlLiDet$ddlType" id="cphWorkArea_ctrlLi_ctrlLiDet_ddlType" style="width:200px;">
   <option value="0" Title="-- Select --">-- Select --</option>
   <option value="1" Title="Choice-1">Choice-1</option>
   <option selected="selected" value="2" Title="Choice-2">Choice-2</option>
   <option value="3" Title="Choice-3">Choice-3</option>
   <option value="4" Title="Choice-4">Choice-4</option>
</select>

So in this case, tooltips doesn't work for values 0, 1..

Not sure what is wrong.. Has any one come across such problem ? 
Any Suggestions ?

Thanks,
Piyush 

hi , please add this

protected void ddlType_DataBound(object sender, EventArgs e)
{
DropDownList ddlobj = sender as DropDownList;
if(ddl!=null)
{
foreach (ListItem li in ddlobj.Items)
{
li.Attributes["title"] = li.Text;
}
}
}

add databound event in drodown

hope it will be helpful

[RESOLVED] Direct open or save dialog WAVE audio file....possible And a WAV embed player

Hi all,

The scenario is:
I have some wave files in a network folder, that are populated in a aspx page (in this case in a gridview with some other data).
I think it's a limitation how webforms/browsers work, but, is it possible to have a button that pop-ups to Save the file only? And to open the file in the default media player without any pop-up/question?

I'm can only do at the moment the basic Response.Transmit that pop-up a Save/Open/Cancel menu. Any suggestions?

And about an embed player...I can use the Windows Media Player component, but the */$#%% visualisations always get's on. I can use a flash player or something with only play/pause and a progress bar to jump to a specific time.

Thank you all

Usually you can add a header as "attachment;" to do that.

Response.AddHeader("Content-disposition", "attachment;filename=wavfile1.wav")



If that is not what you are after, maybe this is...

http://www.malsup.com/jquery/media/audio.html

pedroknd

And to open the file in the default media player without any pop-up/question?

I dont think you have one...

thanks,

[RESOLVED] Trying to access hidden field using javascript

I have been banging my head not knowing what's going wrong.

Here is the code

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

 <script type="text/javascript" >    

function FileNotLoaded(sender, args)    

  {              

 var name = document.getElementById('HiddenField1'); // always getting null here also tried  //document.getElementById("<%= HiddenField1.ClientID %>").value;// this also did not work

alert(name.value);          
    }

</script>

<asp:HiddenField ID="HiddenField1" runat="server" />

I'm calling this function through OnClientUploadComplete of AjaxToolKit FileUploader

Any suggestions,

Thanks,

Rose

 

<script type="text/javascript" >

function FileNotLoaded(sender, args)

  {

setTimeout(CallAfterTimeout,10000);


    }

function CallAfterTimeout()
{
 var name = document.getElementById('HiddenField1'); // always getting null here also tried  //document.getElementById("<%= HiddenField1.ClientID %>").value;// this also did not work

alert(name.value);
}
</script>

Thanks for the help but its still not working. I don't know what is going wrong. I tried to get value of a label instead of hiddenfield and I face same problem.

 

to troubleshoot -

can you view source of rendered html and confirm that this hiddenfield is there on the page????

also can you confirm that this javascript function is being executed or not....?????

thanks,

Try placing your <script> towards the bottom of your page (as close as you can get to the closing body tag) : 

<!-- Content Here -->
    <script type="text/javascript" >

        function FileNotLoaded(sender, args){
            setTimeout(CallAfterTimeout,10000);
        }

        function CallAfterTimeout(){
            var name = document.getElementById('<%= HiddenField1.ClientID %>');
            alert(name.value);
        }
    </script>
</body>

This is likely just an issue of your element attempting to be accessed prior to being set (just ensure that your script is placed after the element and it should be accessible).

Have you tried placing an alert in your FileNotLoaded() function to ensure that it is being called properly? You may also consider using the Developer Tools (F12) within your browser to see if any Javascript errors are being thrown (which could help pinpoint the root of this issue).

Yes hidden field is there and javascript is also being executed but the name of the hidden field in rendered html appears as "MainContent_HiddenField1" instead of HiddenField1. I used this name in my js function. Now I don't get the null error but still it does not show the value of the hidden field.

Thanks

So after either hard-coding the rendered name of the element ("MainContent_HiddenField1") or using the <%= HiddenField1.ClientID%> methods you are actually able to grab the element properly but unable to access the value?

You may want to try using the following to ensure that the value is being grabbed correctly : 

var name = document.getElementById('<%= HiddenField1.ClientID %>');
alert(name); //This should alert "[object HTMLInputElement]"

If the above actually outputs the proper value, then you should be able to access the properties that you need such as id, value etc.

Rion,

I am getting the alert as you mentioned in the post but I can't get its value. Can you please let me know how to get the same.

When I use document.getElementById('<%= HiddenField1.ClientID %>').value , i get the value  as 0 which is not right.

Thanks,

ROse

The value property should be working as you original had shown it. Could it be that there isn't actually a value for your HiddenField Control?

<asp:HiddenField ID="HiddenField1" runat="server" />

Try using the Value property of your hidden field to something a checking if that makes any difference : 

<asp:HiddenField ID="HiddenField1" runat="server" Value="Example" />

using the previous Javascript code : 

var name = document.getElementById('<%= HiddenField1.ClientID %>');
alert(name.value);

When I use document.getElementById('<%= HiddenField1.ClientID %>').value I am getting the value so I guess now the problem is in code behind. I'll check and get back. thanks