|
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 )
|
|
|
|
|
Hi,
I have two textboxes and one label. In textboxes I am entering numbers. To those textboxes I assigned on javascript function which will calculate the difference of those numbers and display in the label. I have one radio button. I need to disable the radio button if the difference is negative.
How to diable the radio button based on label value. I am assigning the difference to label in javascript function.
Thanks
|
|
|
|
|
If you are already using Javascript to assign the label, then it should be easy set the radio button appropriately.
if(value < 0)
radiobtn.checked = false
only two letters away from being an asset
|
|
|
|
|
Hi interested,
I have 2 small web pages using ASP.Net under VB.Net code, the first containing DropDownList containing countries filtering into it, when I select one of the countries it should filter cities of this selected Country into other DropDownList in the Second web page, I need to know How to do this, Plz some Help using just few codes no need to wizard.
Mr.Wonderful
Programmer
modified on Thursday, January 03, 2008 12:13:41 PM
|
|
|
|
|
Hi to all. I've been trying to find a way of resolving a problem I have and I can't quite figure it out how to do it.
I would like to achieve the following: I want to be able to list the directories (and subdirectories) of the hard drive of an user local machine, when he access a web page, displayed in a treeview, like a kind of XP File Explorer.
Is this possible, at all? If it is, how can I achieve this? Can I make this using "regular" asp.net, or "hell no!"? I'm asking this because I really can't seem to understand how I could list the folders of the client hardrive. For example, I can't run a command like this
Dim drives As String() = Directory.GetLogicalDrives()
in a way that it lists the drives of the PC of the client that is accessing the webpage, can I?
If this can't be done by "regular" code, how could I do it? ActiveX? Ajax? I haven't worked with any of these technologies so I'm really just wondering here...
At this point I don't even care if I can already put the directories in a treeview or not... I would just be happy to know a way to just print the list of directories.
I would appreciate if somebody could please direct me to a direction, an article or something that would enlighten me on what and how to do this.
Thanks in advance.
TechnoSpike
modified on Thursday, January 03, 2008 12:25:09 PM
|
|
|
|