从输入的文本值更新源url src [英] updating source url src from a text value entered
本文介绍了从输入的文本值更新源url src的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用C#构建应用程序
它在设置页面上收集用户的输入。
It takes input from the user on a setting page.
我想要用户从文本字段输入并使用它来填充源URL值。这是一个MP4文件
I want to take the user input from a text field and use it to populate a source url value. It's for a MP4 file
需要取用户输入的示例代码。
Example code that need to take the what the user entered.
C#代码
< source url src =" C:\inetpub\wwwroot \ video \ Aurora.mp4"类型= QUOT;视频/ MP4" />
<source url src="C:\inetpub\wwwroot\video\Aurora.mp4" type="video/mp4" />
C#代码
它在硬编码时工作我希望能够在文本框中输入路径将路径放在< ; source url src .......
It works when hard coded I want to be able to enter the path in text box have the path placed in <source url src .......
谢谢
Thanks
Gary Powell
Gary Powell
推荐答案
嗨 gpowell1,
>>使用C#构建应用程序
您的应用程序是Windows Presentation Foundation(C#)应用程序吗?
如果是,您可以尝试将源url src绑定到TextBox.Text并使用值转换器将字符串转换为rul src。您可以尝试一下。
WPF值转换器:
https://www.c-sharpcorner.com/UploadFile/87b416/wpf -value-converters /
$
最诚挚的问候,
Yong Lu
Hi gpowell1,
>>Am building an application in C#
Does your Application is Windows Presentation Foundation (C#) Application?
If yes, you can try to bind the source url src to TextBox.Text and use a value converter to convert the string to the rul src. You can try it on your side.
WPF Value Converters:
https://www.c-sharpcorner.com/UploadFile/87b416/wpf-value-converters/
Best Regards,
Yong Lu
这篇关于从输入的文本值更新源url src的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文