Questions tagged as 'c#'

1
answer

How to pass parameters to the _Layout.cshtml view in Asp.Net projects

Hello, seeing that I have a% control panel%, my layout basically changes only the center with the Area , however I want it for features in the views part, and for those functions I need access the object of the person logged in. How...
asked by 17.05.2014 / 18:52
1
answer

How to get RadioButtonFor value through FormCollection and save in BD SQL Server

I have a model with several booleans, I need to get their values through a FormCollection and save them to the SQL database (it does not accept boolean, so the field is a bit). My View: <div class="editor-field"> @Html.Rad...
asked by 16.05.2014 / 21:36
1
answer

url in MVC project of an .html

I would like to create a .html that will serve to be the _Layout.cshtml menu, I will call it through $("#IDMenu").load('menu_Home.html'); My question, what better place to leave it? I can leave it in the folder /Shared/ ? _Layout.csh...
asked by 13.05.2014 / 20:33
1
answer

C # - EFD Reinf v1_04_00 - How to instantiate and fill all properties of Events?

After my question answered here: # And in the question: REINF - Invalid Signature It was clarified that I need to serialize the xml. Using XSD, I generated the classes in C #, also using the @Pedro Gaspar: XSD.EXE Generate classes in...
asked by 07.12.2018 / 14:58
1
answer

Error when serializing with namespace in if

I was serializing a file and it worked normally, but now, when serializing q1 appears in all tags, I'm doing this: StringWriter sw = new StringWriter(); XmlTextWriter tw = new XmlTextWriter(sw); XmlSerializerNamespaces xsn = n...
asked by 12.12.2018 / 12:05
2
answers

Jquery does not date correctly

I did this and the msg is: Invalid Date . I think it's because everything turned string. How do I bring only the numeric part in the date? Incidentally, I say this, because I can not return a date in our format within jQuery . In alert give...
asked by 16.06.2014 / 19:15
1
answer

Using SyntaxTree

I'm studying C # and I came across SyntaxTree while reading about Roslyn . I also read the documentation from Microsoft itself at the link: Introduction to Syntax Analysis However I still have two questions, just to fix the...
asked by 05.12.2018 / 11:31
1
answer

Skip list for model

I have a query that returns a list like this: var list = db.Comentario.Where(d => d.GrupoTrabalhoId == Id).OrderByDescending(s => s.DataComentario).ToList(); After this query, it will return me among other things the user id, I would...
asked by 04.12.2018 / 19:27
1
answer

Webservice does not accept xml file

I am generating an XML, and sending to webservice , and it always returns me the same error, Error 500, however this error is very vague, I was able to have the following return on error:   : ServerCould not parse content   type: javax....
asked by 17.12.2018 / 11:59
1
answer

Write in txt

Friends, I'm trying to generate a txt, in which the user clicks the button and automatically downloads it. You are already generating txt, but would you like to know how to write it? string str = "testando"; byte[] bytes = new byte[str.L...
asked by 14.12.2018 / 13:15