|
Hi,
if (FileUpload1.HasFile == true)
{
FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/Emp/" + FileUpload1.FileName.ToString()));
}
If file is not blank, then this code work fine.
but if the file is blank then it doesn't.
Is there any Solution for this.
or tell me how to check whether file (File can be of any type) is blank or not.
Thanx.
|
|
|
|
|
Priyagdpl wrote: or tell me how to check whether file (File can be of any type) is blank or not.
Check FileUpload1.FileBytes.Length or FileUpload1.FileContent.Length for validating the file size.
|
|
|
|
|
Really Thanx...
Its Work Fine...
|
|
|
|
|
i use AJAX calender extender in my webbased project when i run this project it show exception. How do i clear this exception?A ScriptManager is required on the page to use ASP.NET AJAX Script Components.
|
|
|
|
|
haleemasher wrote: A ScriptManager is required on the page to use ASP.NET AJAX Script Components.
Read the exception.Place ScriptManager in the page.Drag and Drop ScriptManager from the toolbox to the top of the page.
|
|
|
|
|
I forget to add this code in aspx file now its working. Thread end here
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
|
|
|
|
|
Hi guys...,
I am trying to show advertisement page in my site...,
i have more than one image using adrotator control i am displaying it in alternatively...,
now my clients giving script files...,its possible to show the script files also using the adrotator control?,
if its not possible give me some other way...,
how to achieve it...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
|
Hi guys...,
I am trying to show advertisement page in my site...,
i have more than one image using adrotator control i am displaying it in alternatively...,
now my clients giving script files...,its possible to show the script files also using the adrotator control?,
if its not possible give me some other way...,
how to achieve it...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
|
Hi All,
I have a requirement from one client to change the sessionid for each user to avoid session hijacking.
So i did that as suggested by below link.
http://palisade.plynt.com/issues/2007Feb/asp-session-cookies/
Now they asking to binding the session id to the client machine ip.
My application developed using classic ASP.
How can i achieve that, please help me....
|
|
|
|
|
What is the problem with this. Each computer generates its own session with different session id.
If you want to allow the IP based authentication including user id and password, so that the user id is not valid in any other computer, try to store the IP in the user table, and check whether the call is from the same client.
|
|
|
|
|
thanks for your reply...
I have implemented using following steps.
1) i have create one more database table to store clientip and aspsessionid...
2) Create the function to store ASPSessionid and client ip to the table when user logged in successfully
3) Create the function called "validateUserSession()" to Validate sessionid and clientid
4) Whenever user requesting the authenticated page i am calling function "validateUserSession" with current sessionid and clientip
5) if the record exists in the table login success otherwise failed
is that correct approch..
|
|
|
|
|
Hi,
I am using C# and i am new to it. My requirement is I am using Stored procedure for all insert/update. When calling a storedprocedure I need to send parameters to it. Now problem is i am having nearly 80 to 100 parameters in each form and I feel it is cumbersome to add in each form that many no of parameters manualy.
Is there any function/routine to read the parameters from the properties and add it to the stored procedure and make a commad text?
has any one tried it .. please share ..
regards
|
|
|
|
|
Try passing it as xml and use OPENXML in SQL query to process that.
|
|
|
|
|
Hi Arun
any sample code you have ..if so please share with me .
|
|
|
|
|
|
Are you in 3.5???
If so then you can do it using Linq to SQL classes. You can send all the parameters in the function call and run the stored procedure.
This is the easiest process to do this.
|
|
|
|
|
sorry sir
In my radibutton list if we select Abcent option sothat this value save in my database.
|
|
|
|
|
please donot spam.... Read the guidelines before posting..... continue in the same post... plzzzzzzzzz
|
|
|
|
|
Hi Everybody
i have taken a radibuttonlist,and i take three fields Absent.Leave,Present.
so i want to ask you that if we select any option Absent.Leave,Present.so how we pass this value
in data base that this value be gone in database.
thnks
vivek sachan
|
|
|
|
|
Set AutoPostBack to true and use Selection Changed event for server side processing of the selected value.
|
|
|
|
|
your question is not clear,
1) you have 3 list a)Absent b) Leave and c) Present
2) you want to show these 3 in radiobuttonlist
3) if you select any values from the list the value must insert into the database.
Answer:
1) bind the values directly or fetch from the database.
2) Take the login inforamtion and insert the values according to the user into the database like,
radiobuttonlist.selectedvalue or radiobuttonlist.selecteditem
database:
insert into tablename values(radiobuttonlist.selectedvalue or radiobuttonlist.selecteditem) where userid = "userid";
|
|
|
|
|
id person bar
1 ankur royal
2 ankur wishy
3 punit royal
4 punit wishy
5 ankit royal
result will be
Ankur
punit
i want to list person who use more than one bar.how can i do...i want sql query for ms access.
sorry for posting my question in wrong category...
thank in advance...
!- F - R - I - E - N - D - S -!
|
|
|
|
|
adkalavadia wrote: sorry for posting my question in wrong category...
yes, this is the wrong post...
Answer:
select person from table_name group by (bar) having count(*) > 1
|
|
|
|