xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings >
<add key="myname" value="myvalue"/>
appSettings >
configuration>
in *.cs
using System.Configuration;
string name = Convert.ToString(ConfigurationSettings.AppSettings["myname"]);
четверг, 8 октября 2009 г.
HOW TO get value from app.config file
file: app.config
суббота, 3 января 2009 г.
Embedding Forms in an ASP.NET Web Page - ASP.NET
A solution to embed any number of forms going to any URL on the web within any ASP.NET page.
A solution that effectively replaces the __doPostBack function, but the converter tool takes an even simpler approach. It hijacks the form post with script coded directly into an anchor tag:
<a href="javascript:theForm.__VIEWSTATE.value='';
theForm.encoding='application/x-www-form-urlencoded';
theForm.action='http://www.myanothersite.com/form2.aspx';
theForm.submit();" name="submit"
>My form submit</a>
References:
http://www.nerdymusings.com/LPMArticle.asp?ID=27
A solution that effectively replaces the __doPostBack function, but the converter tool takes an even simpler approach. It hijacks the form post with script coded directly into an anchor tag:
<a href="javascript:theForm.__VIEWSTATE.value='';
theForm.encoding='application/x-www-form-urlencoded';
theForm.action='http://www.myanothersite.com/form2.aspx';
theForm.submit();" name="submit"
>My form submit</a>
References:
http://www.nerdymusings.com/LPMArticle.asp?ID=27
Подписаться на:
Сообщения (Atom)