Search

You searched for the word(s): userid:637624

Matching Posts

  • Bind property of usercontrol

    I have Custom user controler, imported from third party assembly. When inserting it into page, I need to set some properties. I've not found any way to do this, On webforms code provide below should work, but in asp.net mvc I can't get it to work. <%@ Register TagPrefix="wd" Assembly="GsmFuns.Widget" Namespace="GsmFuns.Widget" %> <wd:WapShare ApplicationServer="http://localhost:5003/" ID="dw1" FullUrl = '<%# ViewData["Url"
    Posted to ASP.NET MVC (Forum) by sergey_okhotny on 9/16/2009
  • Re: Add link to error message

    This message is part of login process. In this particular case I can create special view and pass User object to it, and in view create logic based for closed, disabled, banned, etc profile. But I like to know, if in future I need to add link to error messages or some other element, is there any way to do it.
    Posted to ASP.NET MVC (Forum) by sergey_okhotny on 5/12/2009
  • Add link to error message

    I have a form with username. In case if username is blocked, I need to add link to restore user profile. E.g.: In controller in validation function if (User.IsClosed) ModelState.AddModelError( "_FORM" , "Profile closed" + string .Format( "<a href=\" {0}\ ">[{1}]</a>" ,Url.Action( "Restore" , new {id = user[ "email_code" ]}), "Restore" )); It almost works, but error message is html encoded. What is your thoughts and
    Posted to ASP.NET MVC (Forum) by sergey_okhotny on 5/12/2009
  • Re: Content-Length and string.Length

    Thank you for verbose answer.
  • Re: Content-Length and string.Length

    I just need to output Content-Length. I'm interesting why real content length grows when using Response.Write?
  • Re: Content-Length and string.Length

    Response is buffered, as it is by default, but content length comes to client is chunked.
  • Re: Content-Length and string.Length

    For now I have following workaround: byte [] s = Encoding.UTF8.GetBytes(resultString); response.AddHeader( "Content-Length" , s.Length.ToString()); response.BinaryWrite(s);
  • Content-Length and string.Length

    I have httphandler what processes some text and then output it to user. Everything is fine except Content-Length property. I use following code response.AddHeader( "Content-Length" , resultString.Length.ToString()); But, I experience problems that actually content length user receive is bigger then Length property return. What to do? I need this working till tomorrow morning :(
  • Re: specific http handler

    Yes, you can use session, then you should add IRequiresSessionState interface to you hanndler class definition. So, you save filename (ID) in Session and then redirect to your getattach.aspx, which you bind to HttpHnadler in web.config
    Posted to Getting Started (Forum) by sergey_okhotny on 1/4/2007
  • Re: specific http handler

    public class AttachmentHandler : IHttpHandler { bool IHttpHandler.IsReusable { get { return true ; } } void IHttpHandler.ProcessRequest(HttpContext context) { //sp_FetchImageContent HttpRequest Request = context.Request; HttpResponse Response = context.Response; string sImageID = Request.QueryString[ "ID" ].ToString(); using (SqlDataReader rsRD = CommonDB.GetReader( "exec sp_FetchImageContent " + BasePage.enc(sImageID))) { if (rsRD.Read()) { Response.ContentType = rsRD[ "ContentType" ].ToString(
    Posted to Getting Started (Forum) by sergey_okhotny on 1/4/2007
Page 1 of 3 (26 items) 1 2 3 Next >