|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data binding etcnow find I'm not sure abut some things. I'd appreciate it if you would comment on all or some of the following. MUST DO IT THIS WAY <asp:CheckBox Checked='<%# Bind("IsPublic") %>'... OR COULD DO THIS <asp:CheckBox Checked="<%# Bind('IsPublic') %>"... WHICH IS BETTER? THESE ARE OK?? <input type="button" onclick="window.location.href = 'UserInfo.aspx'"... <input type="button" onclick="window.location='<%=FromWhoPhoto%>';" ... RUNAT SERVER NOT REQUIRED BECAUSE OF <%= ? RUNAT SERVER SEEMS TO BE IMPLIED (these works ok) SAME FOR <%# ? THIS IS OK (seems to work) onclick="window.location.href='<%# "Events_edit.aspx?Action=Delete&id=" & truncate(Eval("id")) %>'" /> BUT THIS IS NOT OK text="some-text-here '<%#truncate(Eval("id")) %>'" /> "AAaron123" <aaaron***@roadrunner.com> wrote in message Neither is better. Sometimes single quotes are needed because of other news:%23t2YGGEAKHA.4376@TK2MSFTNGP04.phx.gbl... > <asp:CheckBox Checked='<%# Bind("IsPublic") %>'... > <asp:CheckBox Checked="<%# Bind('IsPublic') %>"... > > WHICH IS BETTER? strings / double quotes in the markup. > RUNAT SERVER NOT REQUIRED BECAUSE OF <%= ? runat="server" tells ASP.NET makes the control available server-side. It's required for WebControls, optional for HtmlControls. The <%...%> syntax tells ASP.NET to run whatever it finds between the two delimiters server-side - the HtmlControl itself doesn't need to be run server-side for this. It's normally used to inject text into a control's markup. BTW, posting in all upper case is considered bad netiquette BECAUSE IT LOOKS LIKE YOU'RE SHOUTING!!!!!
Show quote
Hide quote
"Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message I used the upper case to try to make it easier to separate my questions from news:OrYO%23nHAKHA.4432@TK2MSFTNGP05.phx.gbl... > "AAaron123" <aaaron***@roadrunner.com> wrote in message > news:%23t2YGGEAKHA.4376@TK2MSFTNGP04.phx.gbl... > >> <asp:CheckBox Checked='<%# Bind("IsPublic") %>'... >> <asp:CheckBox Checked="<%# Bind('IsPublic') %>"... >> >> WHICH IS BETTER? > > Neither is better. Sometimes single quotes are needed because of other > strings / double quotes in the markup. > > >> RUNAT SERVER NOT REQUIRED BECAUSE OF <%= ? > > runat="server" tells ASP.NET makes the control available server-side. It's > required for WebControls, optional for HtmlControls. The <%...%> syntax > tells ASP.NET to run whatever it finds between the two delimiters > server-side - the HtmlControl itself doesn't need to be run server-side > for this. It's normally used to inject text into a control's markup. > > BTW, posting in all upper case is considered bad netiquette BECAUSE IT > LOOKS LIKE YOU'RE SHOUTING!!!!! > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net the markup. I agree it does look like shouting. Is it still better to use plain text rather than HTML format (which would enable other options)? Thanks "AAaron123" <aaaron***@roadrunner.com> wrote in message Many people have their newsreader configured to filter out HTML posts, and news:eAeyIVJAKHA.528@TK2MSFTNGP03.phx.gbl... > Is it still better to use plain text rather than HTML format (which would > enable other options)? also posts containing binary attachments...
Show quote
Hide quote
"Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message Is this OK? I think I was told that it is not (I may have misunderstood) news:%23SMmZuJAKHA.4336@TK2MSFTNGP04.phx.gbl... > "AAaron123" <aaaron***@roadrunner.com> wrote in message > news:eAeyIVJAKHA.528@TK2MSFTNGP03.phx.gbl... > >> Is it still better to use plain text rather than HTML format (which would >> enable other options)? > > > Many people have their newsreader configured to filter out HTML posts, and > also posts containing binary attachments... > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net but, if ASP.NET simply runs the functions an places the resultant string there, it looks like it should be OK. text="some-text-here '<%#truncate(Eval("id")) %>'" /> Thanks a lot "AAaron123" <aaaron***@roadrunner.com> wrote in message It looks OK...news:%23K7bGFLAKHA.4608@TK2MSFTNGP02.phx.gbl... > Is this OK? I think I was told that it is not (I may have misunderstood) > but, if ASP.NET simply runs the functions and places the resultant string > there, it looks like it should be OK. > text="some-text-here '<%#truncate(Eval("id")) %>'" /> What happened when you tried it...?
Show quote
Hide quote
"Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message I don't remember - it was a while ago and I had problems that may or may not news:ezVdMILAKHA.3432@TK2MSFTNGP02.phx.gbl... > "AAaron123" <aaaron***@roadrunner.com> wrote in message > news:%23K7bGFLAKHA.4608@TK2MSFTNGP02.phx.gbl... > >> Is this OK? I think I was told that it is not (I may have misunderstood) >> but, if ASP.NET simply runs the functions and places the resultant string >> there, it looks like it should be OK. >> text="some-text-here '<%#truncate(Eval("id")) %>'" /> > > > It looks OK... > > What happened when you tried it...? > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net have be related to this. Anyway, I was told (as I understood it at the time) not to do it. If it is not violating some rule I'll try it again. I'm also collecting facts from the Internet but they are all bits and pieces. No comprehensive set of rules. Thanks
Other interesting topics
autoincrement vs uniqueidentifier (easy)
Is Delegation Necessary? session state time out Using if on ASPX-side instead of in code behind restrict number of users á ÇáÅÓáÇã Úä ÇáÅÑåÇÈ¿ Redirect To Login Page - Forms Authentication Urgent - Issues with using Office 2003 PIA on Windows Server 2008 American and European Converted from Christianity to ISLAM Trap Data Tier Errors? |
|||||||||||||||||||||||