|
Simply, I just want to create a folder browser dialog in asp.net.
Well, let me explain it. A customer order a list of picture to be printed. I want to use something like folder browser dialog to chose a folder and then search if these picture exist in this folder. Then I'll copy all these picture into a new folder (called Printed_Picture). Picture in Printed_Picture folder will be printed.
control is used to choose a file not a folder.
modified on Thursday, January 03, 2008 11:25:12 PM
|
|
|
|
|
Your boss is an idiot. You can't do that. Well, if you write a browser plug in, you might, but using ASP.NET you simply cannot.
Why would you want a web app that moves files about on the client PC ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
A customer order a list of pictures to be printed. He want to use something like folder browser dialog to chose a folder and then search if these pictures exist in this folder. Then he want copy all these pictures into a new folder (called Printed_Picture). Pictures in Printed_Picture folder will be printed.
modified on Thursday, January 03, 2008 11:53:16 PM
|
|
|
|
|
They are printed by a service, or the browser is being used to do something entirely client side, and IE is just being used to print local pictures ? If the image is being printed locally, write a little app they can download and run, what's the point of it running in the browser ?
Either way, HTML/javascript does not allow you to wander about the users file system, and with good reason.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, many pictures the capacity is too large and it isn't wise to store them on server. The server only store the thumbnails of these pictures. These pictures is stored in the local desktop in my company. The thumbnail picture and the original picture has the same file name.
The order of a customer always take average 200~300 pictures, it is hard to find one by one in a folder. Then my boss need a control in my company website to search the list of pictures in a chosen folder, then copy them into to Printed_Piture folder. He will choose picture from a folder on his own desktop after checking order, not on a server computer.
modified on Friday, January 04, 2008 12:57:03 AM
|
|
|
|
|
Hi all,
I am developing a asp.net c# web application. In which on a specific condition in a code behind page I want to take the client confirmation, How can I achieve this.
eg: If a client has given some input. I will check the input is already exist using the code behind(server side) and then I want to take a confirmation "does he want to overwrite his new input?". I can't do the checking using the client side script.
any help is appreciated.
Thanks in advance.
-Ram.
|
|
|
|
|
Your two options then are a postback, or AJAX. you would use client side script if you want to show a confirmation message, there's just no way around that, but you can do a postback or AJAX call to check if you want to show the message.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian Graus,
Thanks a lot for your response.
-Ram
|
|
|
|
|
Hi ,
I am facing a typical problem where the same piece of code works at one place and does not at some other place.
The problem is that the check box list does not show me the previous page checked items when I return to the previous page after doing some selections in the next page...
I have used this in the code "$$$ The Problem Occurs Here $$$ " to denote where the problem occurs
The following is the code.
private void RememberOldValues()
{
ArrayList CheckedIndex = new ArrayList();
int index = -1;
for (int i = 0; i <GridView_TestCase.Rows.Count;i++ )
{
GridViewRow row = GridView_TestCase.Rows[i];
index = (GridView_TestCase.PageIndex*GridView_TestCase.PageSize)+i;
bool isChecked = ((CheckBox)row.FindControl("chkSelect")).Checked;
if (Session["CHECKED_ITEMS"] != null)
CheckedIndex = (ArrayList)Session["CHECKED_ITEMS"];
if (isChecked)
{
if(!CheckedIndex.Contains(index))
CheckedIndex.Add(index);
}
else
CheckedIndex.Remove(index);
}
if (CheckedIndex != null && CheckedIndex.Count > 0)
Session["CHECKED_ITEMS"] = CheckedIndex;
}
//Method to repopulate checked index in GridView_TestCase
private void RePopulateValues()
{
ArrayList CheckedIndex = (ArrayList)Session["CHECKED_ITEMS"];
int index = -1;
if (CheckedIndex != null && CheckedIndex.Count > 0)
{
for (int i = 0; i < GridView_TestCase.Rows.Count; i++)
{
GridViewRow row = GridView_TestCase.Rows[i];
index = (GridView_TestCase.PageIndex * GridView_TestCase.PageSize) + i;
//Use If..Else here when the Second Grid View is ready
if (CheckedIndex.Contains(index))
{
CheckBox CheckItem = ((CheckBox)row.FindControl("chkSelect"));
CheckItem.Checked = true;
}
}
}
}
public void gv_MetaDisplay_PageIndexChanging(Object sender, GridViewPageEventArgs e)
{
RememberOldValues_MetaData();
gv_MetaDisplay.PageIndex = e.NewPageIndex;
RePopulateValues_MetaData();
}
private void RememberOldValues_MetaData()
{
ArrayList CheckedIndex = new ArrayList();
ArrayList TestSaved = new ArrayList();
int index = -1;
for (int i = 0; i < gv_MetaDisplay.Rows.Count; i++)
{
GridViewRow row = gv_MetaDisplay.Rows[i];
index = (gv_MetaDisplay.PageIndex * gv_MetaDisplay.PageSize) + i;
bool isChecked = ((CheckBox)row.FindControl("chkDataSave")).Checked;
if (Session["CHECKED_SAVEITEMS"] != null)
{
CheckedIndex = (ArrayList)Session["CHECKED_SAVEITEMS"];
TestSaved = (ArrayList)Session["CHECKED_TESTNAMES"];
}
if (isChecked)
{
if (!CheckedIndex.Contains(index))
{
{
CheckedIndex.Add(index);
TestSaved.Add(row.Cells[1].Text);
}
}
}
else
{
CheckedIndex.Remove(index);
TestSaved.Remove(row.Cells[2].Text);
}
if (CheckedIndex != null && CheckedIndex.Count > 0)
{
Session["CHECKED_SAVEITEMS"] = CheckedIndex;
Session["CHECKED_TESTNAMES"] = TestSaved;
}
}
}
private void RePopulateValues_MetaData()
{
ArrayList CheckedIndex = (ArrayList)Session["CHECKED_SAVEITEMS"];
int index = -1;
if (CheckedIndex != null && CheckedIndex.Count > 0)
{
for (int i = 0; i < gv_MetaDisplay.Rows.Count; i++)
{
GridViewRow row = gv_MetaDisplay.Rows[i];
index = (gv_MetaDisplay.PageIndex * gv_MetaDisplay.PageSize) + i;
//Use If..Else here when the Second Grid View is ready
//$$$ The Problem Occurs Here $$$
if (CheckedIndex.Contains(index))
{
CheckBox CheckItem = ((CheckBox)row.FindControl("chkDataSave"));
CheckItem.Checked = true;
// CheckItem.Visible = true;
//lbl_test.Text = CheckItem.Text;
// Response.Write(CheckItem.Text);
}
}
}
}
}
please help me.//
Thanks ,
Nickle
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
When you say 'the problem occurs here', what does the debugger tell you ? Is the list you check against empty ? Are the Ids changing ? What's causing the test to fail ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
HI .thanks for your reply.. It is taking the boolean true... But it is not displaying on the page.. as checked
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
if (CheckedIndex.Contains(index))
{
CheckBox CheckItem = ((CheckBox)row.FindControl("chkDataSave"));
CheckItem.Checked = true;
// CheckItem.Visible = true;
//lbl_test.Text = CheckItem.Text;
// Response.Write(CheckItem.Text);
}
So, the control is found, it's checked property is set to true, but it's not checked ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So, the control is found, it's checked property is set to true, but it's not checked ?
Yes the above is true..
Please let me know how to solve it.
Thank you ,
Warm Regards,
Nikhil Pagidala
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
Hi,
I have one default.aspx page and many .ascx user controls that are displayed inside default.aspx page. There is always only one .ascx user control in the default page (placeholder) at one time. This page is added dynamicly in Page_Load of the default.aspx :
protected void Page_Load(object sender, EventArgs e)
{
this.LoadContent();
}
public void LoadContent()
{
this.placeholderContent.Controls.Clear();
this.placeholderContent.Controls.Add(this.LoadControl([...some mechanism how to get right file...]));
}
during Page_Load of currently loaded user control, it might happen that depending on user action this control requires to be changed to different .ascx user control , so LoadContent (in default.aspx ) is called to dump current control and load new one.
Problem occurs that when a new control is loaded after an old control was dumped, events (button clicks) of new added control are not registred properly. When a button on new control is clicked, it doesn't invoke the registered event during next postback. Event's start working from second postback on... (if the user control doesn't change)
thanx for help!
zilo
|
|
|
|
|
I thnk Page Load is too late to do this, you need to do it in the loadviewstate event for events to fire properly.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
thanx for answer, I'll try that.
zilo
|
|
|
|
|
Hi,
when adding controls to my placeholder in loadviewstate , they are not displayed at all
zilo
|
|
|
|
|
You have to use the LoadControl method of the page class.
This way, the "state" of the user control reflects the "state" of the page.
For more information search with google for "dynamically add usercontrol asp.net"
-^-^-^-^-^-^-^-^-^-^-^-
no code is free of bugs
|
|
|
|
|
That's what I do - use LoadControl of the Page class.
I'll try google that link.
thank you
zilo
|
|
|
|
|
Hi,
I've seen many tutorials and they all have one thing in common. They are very simple and do not cover this problematics deeply enough. I did not learn anything new. I would appreciate your help if you have any experience in dynamic loading and changing user controls.
thanx
zilo
|
|
|
|
|
Move it from Page_Load to Page_OnInit and hopefully that should fix your problem.
|
|
|
|
|
It did not help.
It behaves same way as when in Page_Load
zilo
|
|
|
|
|
Hey all,
I have the need to write a small web app that will bulk insert data in mysql. For example, let's say I have a couple of combo boxes and text boxes. The selections that the user makes in the combo boxes need to appear on each inserted row. The text boxes will contain specific data that require their own rows. This will be a listing of financial accounts, and the user will enter in the account numbers and the amount. The page will have something like 20 different rows of text boxes for each account that need to be filled in at the same time. So picture this like a spreadsheet of text boxes where the user needs to enter specific information in each box that needs its own row in the database, because each row will have the combo box information and timestamp for auditing purposes.
My big question is how to go about doing this with xml. I'm pretty that sure this would be the best way unless you guys have something else. I have read a lot of resources on using xml with bulk insert, but I need this in vb.net. That documentation has been hard to come by.
Could someone point me in the right direction?
Thanks all!
|
|
|
|
|
Hi All,
I have a user web page Asp.Net under vb.Net this page for users via live page, the user should insert his E-Mail in text Box and press the Enter Button to Answer The Question(s) of form appears Randomly Each time he entered His Email. The Form containig Question or more and a probable RadioButton Answers,I need to Know How I make a Random Form. You Should know I make a DropDownList Containing The Text of Question and The Answer in Radio Button filtered by Database in Server Page. Plz Some Help or Notes.
Regards
Mr.Wonderful
Programmer
|
|
|
|
|
You'd have a data base that reads random questions, the page would just take them and show them
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|