|
I didn't use the html5 version of uploadify, so I'm not sure how it works.
I had to write a Sub Process module, that mimics a webpage on upload, and I saved the image file on the drive in a temp location, actually a library, in which the image can be retrieved again for reprocessing. The Sub Process Module was session capable, so you can set a value. So my Sub Process uses system.drawing to create 4 images in various sizes, and writes a temp image with a temp name for previewing. Then I wrote a cleanup function that searches for previous temp files by date and time, and deletes the ones that are 1 day old.
Why are you trying to save the byte stream in a session?. You can save it as a byte() array or memory stream, just save the filepath in the session, or are you making it cluster ready?
|
|
|
|
|
private void button3_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\new.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
con.Open();
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter("select * from master", con);
da.Fill(dt);
DataRow r = dt.NewRow();
SqlCommand cmd = new SqlCommand("insert into master(itemno,itemname,rate,session) values(" + textBox1.Text + ",'" + textBox2.Text + "'," + textBox3.Text + ",'" + textBox4.Text + "')", con);
cmd.ExecuteNonQuery();
r[4] = convertToByte(textBox6.Text);
dt.Rows.Add(r);
SqlCommandBuilder cb = new SqlCommandBuilder(da);
da.Update(dt);
RefreshData();
con.Close();
MessageBox.Show("picture save in the database");
}
catch (Exception ex) { MessageBox.Show(ex.Message); }
}
private void button5_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
textBox6.Text = Path.GetFullPath(openFileDialog1.FileName);
pictureBox1.ImageLocation = textBox6.Text;
}
}
byte[] convertToByte(string sourcePath)
{
FileInfo fi = new FileInfo(sourcePath);
long sizeByte = fi.Length;
FileStream fs = new FileStream(sourcePath, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
byte[] data = br.ReadBytes((int)sizeByte);
return data;
}
|
|
|
|
|
hi sarathviper
Thanks for your reply
I need to save file from client side ...
Thanks
Vijay rangs
|
|
|
|
|
function pageLoad(sender, args) {
//Register the form and upload elements
window.parent.register(
$get('<%= this.form.ClientID %>'),
$get('<%= this.fileUpload.ClientID %>')
);
}
|
|
|
|
|
Looks like you have placed this Javascript in a separate JS file. Place it in it's related HTML/ASPX page and it should be available. Currently, the get cannot formulate the variable to access and look for the object.
|
|
|
|
|
Hi,
I want to ask how can I set a regular expression with the following:
Usernames can only contain alphanumeric characters (A-Z, 0-9) or a period (".").
Periods (".") cannot be at the beginning or end of the user name.
Username can have one Periods (".") only.
Usernames must be at least 5 characters long
|
|
|
|
|
Are you trying to develop your website one CodeProject question at a time? Please read How to get an answer to your question[^], and try to do the basic research for yourself, and be a bit more specific about your problems.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I like that!
Haven't seen you around for awhile, was wondering if everything was ok.
Wish chris would make the font .5 larger, other than that, the new look and feel is quite groovy.
jkirkerx out
|
|
|
|
|
I've been here, I just don't reply to ASP.NET queries very often. It's good to see you are getting to be a regular with answers now.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You guys really helped me out in learning c++, took the time to deal with my questions, and I completed my goal, so the least I can do is answer some questions over here and return the generosity.
I learned how to create threads in asp.net (vb), and shifted all my email functions over to it, so they process and send in the background now, fire and forget. And went back through my code and optimized it to be more efficient with allocating variables, and the proper use of structure and classes now.
Code Project is a nice place to hang out. I like it here. Now I just need to work harder for the cool icon next to my name, instead of the head avatar. That's all I want.
|
|
|
|
|
If you want someone to write your regex expression, then just ask someone to write it for you. Don't beat around the bush.
This is off the top of my head, you'll have to test it more through. You may have to tweak it abit.
Learn regex, and download the regex tester
http://www.radsoftware.com.au/?from=RegexDesigner[^]
http://www.regular-expressions.info/[^]
^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$
|
|
|
|
|
Why do you want to get a regex (which hardly anyone would understand later on), where 4 simple tests would do better?
|
|
|
|
|
Hi,
I want to ask how can I make two ASPxButton in one line? I tried putting them but the second is going to the next line?
|
|
|
|
|
jrahma wrote: how can I make two ASPxButton in one line?
If it's specific to ASPxButton, I would suggest you to look at their documentation/forum for help.
If it is not dependent on button type (which most probably should be the case), one cannot help you since you have not shared your code. You need to define the HTML properly (proper table formation probably!) such that controls can be placed at exact locations.
|
|
|
|
|
Try keeping them inside a table .
|
|
|
|
|
I am using ASPxNavBar.
I want to know how can I loop through all items to disable all except one which should have enable=true?
|
|
|
|
|
Have you consideed using jquery each, to loop through all menu elements that have a common css class name.
$(".menuItem").each(function() {
if ($(".menuitem").val() != "my choice") {
$(".menuItem").attr('disabled', 'disabled');
}
});
|
|
|
|
|
Hi friends,
As I am new to ASP .net , I am developing an application for sending mails from Gmail to other Bizmail accounts. My problem is, I am able to send mails <b>Gmail to Gmail</b> , but i am getting failure message, when i send to <b>Bizmail </b>accounts. Can you please guide me ,where I am doing mistake?
I am using smtp Server : <b>smtp.gmail.com</b>
Thanks in Advance..!
|
|
|
|
|
To that point what you did wrong is not posting any source code.
No more Mister Nice Guy... >: |
|
|
|
|
|
hi,
can any one tell me how i can implement google doodles in my project so that in my project (search engine) images can change like the real google logo change ........
plz give me the complete coding for doing this using vb.net
|
|
|
|
|
You can use flash for this, and I also believe HTML 5 can handle a lot of this too. I would recommend searching first before asking for the complete source code.
|
|
|
|
|
I've have a web application in ASP/VB6.
Sometimes after login,we get a white screen with no contents at all. The brower just shows a white screen.
Any ideas?
Cheers
|
|
|
|
|
berba wrote: after login,we get a white screen with no contents at all. The brower just shows a white screen.
Do a 'ViewSource' and see what's in it. If there is nothing, then your server has not returned anything as an HTML to be displayed. You need to look at the implementation, error logs and see if you find anything wrong. Response is not as you are expecting after login.
|
|
|
|
|
|
To apply a simple listview with edit,delete button using asp.net using C#.
|
|
|
|