|
I am tryng to create a Bitmap completely in memory (Bitmap BMP = new BitMap(300,300)) and later with GDI create a complete image based on mathematical calculations, and later show the result in the ASP .Net page, but I don`t know which control use for it because all the ASP .Net image control that I find include an URL string property for stablishing the source image, but I don´t find any control which accepts an in memory image as source like pictureBox does in Windows Forms, but I find pages doing it, could anybody tell me how is it possible in ASP .Net.
Best Regards
|
|
|
|
|
There aren't any built-in controls that will render an image from memory. You'll have to create you own server control, but there are numerous examples here and elsewhere.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Could you please give any link talking about this Server Control creation.
Best regards
|
|
|
|
|
You need to learn how to find information on your own.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello,
I have a Javascript function that needs to be thrown several times in the code-behind(C#) for user navigation.
I wanna know if calling the function by the method ScriptManager.RegisterClientScriptBlock is a good practice to resolve this issue.
Thanks.
|
|
|
|
|
What kind of method? Does it matter to you when it gets processed during page load? Is there a reason you aren't creating one function that makes all the necessary calls and registering that?
|
|
|
|
|
brunoseixas wrote: a Javascript function that needs to be thrown several times in the code-behind(C#)
You can't call a JavaScript function from code-behind. You can however write the JavaScript to the output stream. The best way would be to execute the script from the client-side load event such as
<body onLoad="MyFunction">
or with JQuery
<script>
$(document).ready( function() { MyFunction(); });
</script>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes, there is a reason.
This page uses a free javascript code called niceforms (http://www.emblematiq.com/lab/niceforms/), it has several bugs and needs to be recharged several times. And the problem is that it does not reload correctly if called at events such as onLoad or EndRequest in html (I do not know why). So, I created a static method in BasePage application that contains a method that performs this function across the ScriptManager.
The solution I found was this, and I'm just calling it in Page_Load when is postback.
Thank you.
|
|
|
|
|
brunoseixas wrote: The solution I found was this...
No the solution is to use code that isn't buggy and functions appropriately.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes, of course. Tell that to the dummies of the commercial area. Haaaa
|
|
|
|
|
Hi,
I am debugging through a web application that was written in C#. When the app loads it gets some values using static methods. Whenever I stop the debugging and run it again then it doesn't go into these static methods again as they are static. I want to kill this static variable instance so that I can debug through these methods again. I have stopped the web server in VS2010, but it doesn't work. I hope I am making sense?
Thanks
|
|
|
|
|
That isn't what static methods mean. Static means that they do not rely on an instance of the object. If you call the method it will be executed every time it is called. If you aren't hitting your breakpoints in the static method then something else is going wrong.
|
|
|
|
|
Thanks for the reply.
I'm actually testing a singleton that was written to retrieve global values. It's the first time I am working with singleton so I am debugging to see how it works. The first time I ran it I got the instance of the singleton object, then I stopped it. I ran it again, and it doesn't go into the property where it returns the singleton's instance. I am using VS2010.
Thanks
|
|
|
|
|
Too many pronouns. When you ran "it", is "it" an exe, a method? If "it" is a method I would not expect a singlton to run the code to create an instance more than once. That is what makes something a singleton. Your description of the situation is far too vague to really give you any concrete answers.
|
|
|
|
|
Because the content pages can have different size so I am having problems of positioning the content pages inside the Master, and the Master Elements don`t keep an strict position, Because it must be a normal problem I think that it shall have a normal solution, but I don´t know it, so could you please tell me if is there any rule or way of keeping the Master elements unchanged independently of which content page is located in.
Best Regards
|
|
|
|
|
1. Use Flow layout
2. Use html tables in your master page to design your UI. This would keep your master controls intact and a specified placeholder for your content page.
|
|
|
|
|
The only problem is that my Master page also paint an lower icon bar for all the pages, so the content page comes in the middle and depending of it´s size it makes the Master change it's appearance, but I´ll check about Flow Layout
|
|
|
|
|
Hi,
I failed to manage roles by code and web confg. so I used the code easily I have a table Security of my database (login,password,profil) and a login.aspx page and I need to open pages in each service to the people of this service .is this correct? can I combine the files into folders?
I must change the file wb.config?
my code:
protected void Button7_Click(object sender, EventArgs e)<br />
{<br />
SqlConnection aCon = new SqlConnection(@"Data Source=.\SQLEXPRESS;UID=sa;Password=******;Initial Catalog=xxxxx");<br />
<br />
<br />
aCon.Open();<br />
String rqtr3 = " SELECT * FROM SECURITE WHERE LOGIN = '" + Textbox3.Text + "' AND PASSWORD='" + TextBox12.Text + "'";<br />
SqlCommand cmr3 = new SqlCommand(rqtr3, aCon);<br />
SqlDataReader drr3 = cmr3.ExecuteReader();<br />
<br />
while (drr3.Read() == true)<br />
{<br />
TextBox2.Text = drr3["PROFIL"].ToString();<br />
if (TextBox2.Text == "service1")<br />
{<br />
Response.Redirect("default1.aspx");<br />
}<br />
else<br />
{<br />
if (TextBox2.Text == "service2")<br />
{<br />
Response.Redirect("default2.aspx");<br />
}<br />
<br />
else<br />
{<br />
if (TextBox2.Text == "service3")<br />
{<br />
Response.Redirect("default3.aspx");<br />
} <br />
else.........<br />
<br />
}<br />
<br />
<br />
}<br />
<br />
}<br />
<br />
}
Thanks.
|
|
|
|
|
First, absolutely NEVER, EVER use unvalidated user input in your SQL statements. This is even more hanous because you are querying the security database. Lookup a term called 'SQL Injection attack'.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
even with an intranet? you advise me what?
Thanks
|
|
|
|
|
Even more so, most attacks occur from the inside
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Role based security is also available out of the box with ASP.NET
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks a lot Mark Nischalke and Jinal Desai - LIVE,
I used the link but when I login I have this message: Username / password incorrect. Please try again.(password and database connection are just)
I think that I have a problem with the web config.
Mark Nischalke I do not understand:Role based security is also available out of the box with ASP.NET.
thanks
modified on Monday, July 12, 2010 11:20 AM
|
|
|
|
|