|
Encryption uploaded files name, if Encryption a .docx file ,it's tried too
|
|
|
|
|
hello to all,
i am in a crisis, the deadline for submitting my asp.net website as major project is approaching and i am stuck at a critical stage. plz provide me with a solution asap.
PROBLEM: i have a registration form made up through external css, which i have included in the project files. the form is a sliding jquery form and i had removed the input data fields provided in original html markup (that came with the css and jquery files) and inserted the standard controls, such as textboxes, labels etc. for entering email id, pasword etc. Now, when i refer to these controls in codefile (default.aspx.cs), it shows error that these controls do not exist in the current context. I have checked the ids of controls and the inherit class, everything is correct, i don't get it why the debugging is hindered.
|
|
|
|
|
sqlds1.InsertCommandType = SqlDataSourceCommandType.Text;
sqlds1.InsertCommand = "insert into Network (States,LGA,Glo,MTN,Airtel,Etisalat,Multilinks,Starcomms,Visafone,Zoom_mobile,Remarks)values(@countryList,@stateList,@greencom,@mtngsm,@airtel,@etisalat,@multilinks,@starcomms,@visafone,@zoomm,@remarks)";
sqlds1.InsertParameters.Add("countryList", countryList.Text);
sqlds1.InsertParameters.Add("stateList", stateList.Text);
sqlds1.InsertParameters.Add("greencom", greencom.Text);
sqlds1.InsertParameters.Add("mtngsm", mtngsm.Text);
sqlds1.InsertParameters.Add("airtel", aritel.Text);
sqlds1.InsertParameters.Add("etisalat", etisalat.Text);
sqlds1.InsertParameters.Add("multilinks", multilinks.Text);
sqlds1.InsertParameters.Add("starcomms", starcomms.Text);
sqlds1.InsertParameters.Add("visafone", visafone.Text);
sqlds1.InsertParameters.Add("zoomm", zoomm.Text);
sqlds1.InsertParameters.Add("remarks", remarks.Text);
sqlds1.Insert();
Above is my snippets but its giving me compile Err. CS0103: The name 'greencom' does not exist in the current context
|
|
|
|
|
I think you are missing something while you are adding parameter to your sqlparameter.
use the below link[^], it will help you in clearing your boubts.
|
|
|
|
|
"insert into Network (States,LGA,Glo,MTN,Airtel,Etisalat,Multilinks,Starcomms,Visafone,Zoom_mobile,Remarks)values
this sql not't greencom filed, eg::
sqlds1.InsertCommandType = SqlDataSourceCommandType.Text;
sqlds1.InsertCommand = "insert into Network (States,LGA,Glo,MTN,Airtel,Etisalat,Multilinks,Starcomms,Visafone,greencom,Zoom_mobile,Remarks)values(@countryList,@stateList,@greencom,@mtngsm,@airtel,@etisalat,@multilinks,@starcomms,@visafone,@zoomm,@remarks)";
sqlds1.InsertParameters.Add("countryList", countryList.Text);
sqlds1.InsertParameters.Add("stateList", stateList.Text);
sqlds1.InsertParameters.Add("greencom", greencom.Text);
sqlds1.InsertParameters.Add("mtngsm", mtngsm.Text);
sqlds1.InsertParameters.Add("airtel", aritel.Text);
sqlds1.InsertParameters.Add("etisalat", etisalat.Text);
sqlds1.InsertParameters.Add("multilinks", multilinks.Text);
sqlds1.InsertParameters.Add("starcomms", starcomms.Text);
sqlds1.InsertParameters.Add("visafone", visafone.Text);
sqlds1.InsertParameters.Add("zoomm", zoomm.Text);
sqlds1.InsertParameters.Add("remarks", remarks.Text);
sqlds1.Insert();
|
|
|
|
|
Sqlds.InsertCommandType = SqlDataSourceCommandType.Text;
Sqlds.InsertCommand = "insert into Population(States,LGA,Males,Females,Bothsexes,Landsize,Terrain,Remarks) values (@countryList,@statelist,@male,@fmale,@bsexes,@landsize,@terrain,@remarks)";
Sqlds.InsertParameters.Add("countryList",countryList.SelectedValue);
Sqlds.InsertParameters.Add("stateList", stateList.SelectedValue);
Sqlds.InsertParameters.Add("male", male.Text);
Sqlds.InsertParameters.Add("fmale", fmale.Text);
Sqlds.InsertParameters.Add("bsexes", bsexes.Text);
Sqlds.InsertParameters.Add("landsize", landsize.Text);
Sqlds.InsertParameters.Add("terrain", terrain.Text);
Sqlds.InsertParameters.Add("remarks", remarks.Text);
Sqlds.Insert();
I am having problem with my dropdownlist, Its not inserting selected values into database only the first value on the list that is inserted into the db.
Here is the varable for it.
Sqlds.InsertParameters.Add("stateList", stateList.SelectedValue);
|
|
|
|
|
Which event you have written above code?
|
|
|
|
|
solution:
public void Page_Load()
{
stateList.AutoPostBack = true;
}
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
u code
}
}
|
|
|
|
|
That's right.
Another Convenience way:
You would Config AutoPostBack in the Property windows of the Dropdownlist.
|
|
|
|
|
|
|
you are picking the only SelectedValue of dropdownlist, put this thing in foreach or for loop that moves till the items.count is maximum.
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
I want to use file upload in my website, without using file upload control.
I have used an asp textbox & an asp button. On clicking the button, the path of the file to be uploaded, comes in text box.
Now, how can I upload the file whose path is there in the text box.
Code that I used till now for button click is given below:
protected void btnUpload_Click(object sender, EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Title = "C# Corner Open File Dialog";
fdlg.InitialDirectory = @"c:\";
fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*";
fdlg.FilterIndex = 2;
Thread stathread = new Thread(new ThreadStart(() => fdlg.ShowDialog()));
stathread.SetApartmentState(ApartmentState.STA);
stathread.IsBackground = true;
stathread.Start();
stathread.Join();
txtUpload.Text = fdlg.FileName;
}
modified 17-May-12 5:33am.
|
|
|
|
|
u used
OpenFileDialog ,you select file,but u don't loadup the file,you'll used file class, filecopy to you setting path.
InitialDirectory = @"c:\";
|
|
|
|
|
I have to create a site with paid login user. If user need to be a member of this site , have pay some amount of money . for that how will handle transferred amount to our account. via credit card or debit card or online banking site.
How can i do these? please give idea or article
Thanks...
|
|
|
|
|
|
Pay pal okay.
through, can user give debit or credit card account number;
then, what are the steps i have to do for access pay pal library
|
|
|
|
|
anishkannan wrote: what are the steps i have to do for access pay pal library
Check the PayPal website for information on their API.
Programming is work, it isn't finger painting. Luc Pattyn
|
|
|
|
|
Maybe your customer should apply for a merchant account first, and see if they are credit worthy before you try and write any code.
Merchant accounts and payment gateways have many sorts of hidden rules, like PayPal won't approve a pawn shop, guns, pornography, casino's, online gambling, the list goes on and on.
Your a programmer, you can't tell your customer that they have to use a certain company for electronic payments. 50% of applicants get rejected.
|
|
|
|
|
When the width of DropDownList and TextBox seted to same, The width of the TextBox longer than the DropDownList's. Why is this? How do This prolem settled?
|
|
|
|
|
It's always been that way. You make the ddl about 3 px wider
|
|
|
|
|
I have settled this problem.
solution: I removed "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" in 2nd row of the *.aspx page.
thank you very much!
|
|
|
|
|
Hi i want a photo gallery for ASP.net in which i could zoom the thumbnails with next and previous option.I used NotesforGallary, but after doing everything its just showing thumbnails not the slide show......If anybody could help....Thanks in Advance!
Inderjeet Kaur
Sr. Software Engg
|
|
|
|
|
What have you tried so far? Where are you stuck?
If you have thumbnails with zoom and all you want is slideshow, see: 23 Best jQuery Slideshow (Gallery) Plugins[^]
There are lots of jQuery plugins related to thumbnail sliders. Check them out.
|
|
|
|
|