|
I don't think as per your requirement list will work.One thing you can do,You can some key value pair collection.In key you put operatior id and get the object from the value.
Else you can make a static function that takes the list of objects in parameter ,property name and value to search.Then search and return the result.
Cheers!!
Brij
|
|
|
|
|
i am using ajax toolkit and when i drag it on page it gives me error
error rendering tab panel script manager is required even script manager is already on page....
please guide how to solve it..???
umerumerumer
|
|
|
|
|
Which template did you select ? AJAX enabled sites or Normal web sites ? Do you have multiple script manager on that page ?
cheers,
Abhijit
|
|
|
|
|
no i have single update panel on page and normal mode not ajax enabled website...
umerumerumer
|
|
|
|
|
Use Ajaxenabled website for using Ajaxtoolkit
Cheers!!
Brij
|
|
|
|
|
hi,dear
iam working on uploading image from contentPage of asp.net ..its working fine when iam using a normal webpage...when iam giving in tag of normal webpage the code:
<form id="form1" enctype="multipart/form-data" runat="server">
</form>
its works fine i can upload my image ,but using ContentPage when iam not using this form tag here,but only at MasterPage..iam not getting image content in my Upload control..
>>>>iam using Controls in my ContentPage are:
1.input(file) HTML Control named filUpload
2.webButtonControl named btnUpload.
plz help me out...thanx in advance
Here is my MasterPage code part
<body>
<form id="form1" enctype="multipart/form-data" runat="server">
<asp:scriptmanager runat="server" id="scrpt1" xmlns:asp="#unknown" />
<div>
</div></form></body>
ContentPage...Default3.aspx.cs
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
this.Page.ClientScript.RegisterForEventValidation(btnUpload.ID);
}
protected void btnUpload_Click(object sender, System.EventArgs e)
{
string sSavePath;
string sThumbExtension;
int intThumbWidth;
int intThumbHeight;
sSavePath = "images/";
sThumbExtension = "_thumb";
intThumbWidth = 160;
intThumbHeight = 120;
if (filUpload.PostedFile != null) ...
{
HttpPostedFile myFile = filUpload.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen == 0)
{
lblOutput.Text = "No file was uploaded.";
return;
}
if (System.IO.Path.GetExtension(myFile.FileName).ToLower() != ".jpg")
{
lblOutput.Text = "The file must have an extension of JPG";
return;
}
byte[] myData = new Byte[nFileLen];
myFile.InputStream.Read(myData,0,nFileLen);
string sFilename = System.IO.Path.GetFileName(myFile.FileName);
int file_append = 0;
while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename)))
{
file_append++;
sFilename = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ file_append.ToString() + ".jpg";
}
System.IO.FileStream newFile
= new System.IO.FileStream(Server.MapPath(sSavePath + sFilename),
System.IO.FileMode.Create);
newFile.Write(myData,0, myData.Length);
newFile.Close();
System.Drawing.Image.GetThumbnailImageAbort myCallBack =
new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback);
Bitmap myBitmap;
try
{
myBitmap = new Bitmap(Server.MapPath(sSavePath + sFilename));
file_append = 0;
string sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ sThumbExtension + ".jpg";
while (System.IO.File.Exists(Server.MapPath(sSavePath + sThumbFile)))
{
file_append++;
sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName) +
file_append.ToString() + sThumbExtension + ".jpg";
}
System.Drawing.Image myThumbnail
= myBitmap.GetThumbnailImage(intThumbWidth,
intThumbHeight, myCallBack, IntPtr.Zero);
myThumbnail.Save (Server.MapPath(sSavePath + sThumbFile));
imgPicture.ImageUrl = sSavePath + sThumbFile;
lblOutput.Text = "File uploaded successfully!";
myThumbnail.Dispose();
myBitmap.Dispose();
}
catch (ArgumentException errArgument)
{
lblOutput.Text = "The file wasn't a valid jpg file.";
System.IO.File.Delete(Server.MapPath(sSavePath + sFilename));
}
}
}
public bool ThumbnailCallback()
{
return false;
}
}
|
|
|
|
|
premprakashbhati wrote: but using ContentPage when iam not using this form tag here,but only at MasterPage..i
Content Page should not have any Form Tag. All the controls should be in asp:content tages.
premprakashbhati wrote: am not getting image content in my Upload control..
>>>>iam using Controls in my ContentPage are:
1.input(file) HTML Control named filUpload
2.webButtonControl named btnUpload.
I believe you are using this in Content Page . You are having a FileUpload control and Having a Asp Button. and you have given the code of button click. Then what is your problem ?
premprakashbhati wrote: iam not getting image content in my Upload control..
What does it mean ?
cheers,
Abhijit
|
|
|
|
|
hi ,abhijeet...
my problem is when iam uploading the image file by clicking browse button of filUpload --input(file)HTMLControl,and clicked on Upload webControl button..iam not getting the image file in filUpload control..(Here iam Working with Master and ContentPage)
>>i have tested this by taking one asp.net page and provided in tag that
<form id="form1" enctype="multipart/form-data" runat=server>
and in aspx.cs page the provided .cs code..its working fine means iam getting the image file in filUpload Control and i can upload it to the image control on my .aspx in thumbnail form and storing the same image file in images application folder .
modified on Friday, December 26, 2008 5:31 AM
|
|
|
|
|
plz see to it ..
no answer from anyone............
|
|
|
|
|
|
Dear,
I using GridView in ASP.NET
it can show size paging, and work normally (data changed when click move page), but when I use code below to change row, it does not work (data not changed)
foreach (GridViewRow gvr in rst_Table.Rows)
{
gvr.Cells[0].Text = "" + i.ToString() + ".";
gvr.Cells[5].Text = CommonUtils._gender(ds.Tables[0].Rows[i -1]["Gender"].ToString());
i += 1;
}
Please help me
Socheat
|
|
|
|
|
Socheat.Net wrote: ut when I use code below to change row, it does not work (data not changed)
What's error are you getting ?
cheers,
Abhijit
|
|
|
|
|
I did not get error, but data that display still the same in first page
Socheat
|
|
|
|
|
Debug the code,Is the function is called where you have written the above code.
Cheers!!
Brij
|
|
|
|
|
Where you have written this code?
Cheers!!
Brij
|
|
|
|
|
hi
Could anyone tell me how can I include a chat in my asp.net2005(C#) web application(chat like gmail chat) its like a one to one chat, new messages shown in a pop windows. Anyone give me some sample code....
otherwise send some links related to this...
Regards
mohan
|
|
|
|
|
|
i have a project in asp.net 2003, when i open it in 2005 am getting following error message:
" IT IS AN ERROR TO USE A SECTION REGISTERED AS ALLOWDEFINITION ='MACHINETOAPPLICATION BEYOND APPLICATION LEVEL. THIS ERROR CAN BE CAUSED BY AVIRTUAL DIRECTORYNOT BEING CONFIGURES AS AN APPLICATION IN IIS"
am not much aware about this kind of errors. could any one clear my doubt...
self confidence+hard work=SUCCESS
|
|
|
|
|
Are you trying to open the Web sites from where ?
just open from VS 2005, it will automatically do needful.
cheers,
Abhijit
|
|
|
|
|
yeah abhijit am trying to open from 2005 only, when i built the appliaction i throws the exception i mentioned....
self confidence+hard work=SUCCESS
|
|
|
|
|
where is your web.config file ? is it in the root or Subdirectory ? ?It should be in Root Directory.
Any way I have just goggled, its gives[^]
Let me know if its resolved !
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit,
i found that, here with my application there are two web.config files,, when framework ask to take back up ,there is a web.config file in that folder too, so only this problem, i remove that and now my site is running ..
thanks man...
self confidence+hard work=SUCCESS
|
|
|
|
|
Yup... Great !!!
cheers,
Abhijit
|
|
|
|
|
Hi, I have a question with respect to the security implementation of Menu
using sitemap. Normally in the sitemap we can implement role based security
but that is based on the Role based functionality provided by ASP.NET.
Actually in our site we are using custom roles with our own role management
and stuff. So is there a way to hide or show certain elements of the Sitemap
in my menu based on the custom roles without using asp.net roles
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
hi,
I am doing a Project (in ASP.NET using C# ) in which i have to display a Message Box ,after clicking on a button .I have used a MesterPage and i want a javascript message Box .I mean in the following case:
button_Save_click()
{
.....Other code ...
//after completion of above code,Message should be displayed..
message("Data is Saved...");
}
i Want all these in Java Script(and asp.net using C#). Also it should be as simple as possibe,and as soon as possible.
also a confirmation box in which after clicking on Delete button,It should ask "do u want to delete" if yes do this...else do this...
Please do help me..soon
expecting early reply of anbody..
|
|
|
|