|
go back to ur previous post, there u wil get the answer.if u want some thing else then please specify ur query correctly
coolsweety
|
|
|
|
|
I found that you have already pasted the same problem and got the pretty solutions for that.
ok try as below
add the follwing lines of code in between the head tags.
<script language="javascript"><br />
function Warning()<br />
{<br />
if(Uname.value=='')<br />
{<br />
alert("You must enter value");<br />
Uname.focus();<br />
}<br />
}<br />
<script>
in the body tag
<input type="Textbox" name="Uname"><br />
<input type="Button" value="ClickMe" onClick="Warning()">
This will ensure that button click will always displays alert message when ever the TextBox is Empty.
cheer
Ramesh.Kanjinghat
|
|
|
|
|
Hi Young....
I read u article. Thats pretty cool.....
But i have a ques.....How can we restrict the user from selecting a particular item of dropdown list.....pls tell me how to do this
Thanx
Sangeetha
Sangeetha M
|
|
|
|
|
Suppose I have Students' mark table. I want to display this details in grid. For each subject there is two marks. So i need to Display subject name on grid header,it must be the two cells merged,ie i have two columns corresponding to a single columv header. Pls Help urgent
|
|
|
|
|
|
you can use template column in which you can put a table and in case of header where you want to merge the cells can use colspan and in case of data you can use two diffrent cells.
|
|
|
|
|
Hi!
I want to get the live video from webcam in ASP.NET application.
Anyone knows ,plz forward the links or sourcecodes.
thx
|
|
|
|
|
I have a web application, in this application, i am browsing the image path on the clinet machine and those image can be uploaded on the server.
But, this system is working well on the local machine, but it can't be working on internet.
So plese what is the problem?
|
|
|
|
|
What's the error message?
|
|
|
|
|
Hi,
Thank you for the reply.
I am get the FileNotFoundException and error message is File Could not be find.
Thanks
Chetan Ranpariya
|
|
|
|
|
Are you sure that you are getting the file uploaded properly?
How are you uploading/saving?
|
|
|
|
|
Hi,
To select File I am using HTML's File input control. Path of selected file is pushed in to a TextBox.
I am creating FileInfo object for the file path that I get in the textbox and then use Copy Method to copy that file on server.
FileInfo fUpload = new FileInfo(txtFilePath.Text); //Exception Occurs Here
string strDestPath = MapPath("../Files/" + fUpload.Name);
fUpload.CopyTo(strDestPath,true);
I get the Exception in the first line of code.
Should I make the html file control server control and user its PostedFile.SaveAs method to copy the file instead of using textbox?
Thanks and Regards,
Chetan Ranpariya.
|
|
|
|
|
You're posting back to the server and then trying to select a path on the client's machine, which is why you're getting an error.
Try looking at this.
|
|
|
|
|
Chetan Ranpariya wrote: Should I make the html file control server control and user its PostedFile.SaveAs method to copy the file instead of using textbox?
Yes! That is what it is for. What you have tried to do will never work because the path is on the client, and you're created FileInfo instance is on the server.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
Thanks for the sugession.
The way u suggest worked finely.
Now my problem has been solved.
Thanks to all the others who gave me their views.
Chetan Ranpariya.
|
|
|
|
|
Hi Folks..
I am very new at ASP.NET.
"TextBox3 = TextBox1 +TextBox2"...This is the question..
How can I get the sum of two textboxes on another third texbox by leaving te second texbox(I mean by using a tab key vice versa) . Is there any event for this (such as leavefocus?)
Please Help
|
|
|
|
|
You would do this via Javascript on the client machine rather than posting back to the server. Use the onblur event, viz: (NB: CP will replcae the word "onblur" with "removed" in the sample below):
<html>
<head>
<title></title>
</head>
<script language="javascript" >
<!--
function addTB(s) {
var r1 = document.f1.TextBox1.value + document.f1.TextBox2.value;
document.f1.TextBox3.value = r1;
}
// -->
</script>
<body>
<form name="f1" action="">
<input type="text" name="TextBox1" onblur="addTB()" >
<input type="text" name="TextBox2" onblur="addTB()" >
<input type="text" name="TextBox3" >
</form>
</body>
</html>
cheers
P
|
|
|
|
|
Thank you very much...This is the answer!!!!!!!!!!!!!!!!!
|
|
|
|
|
How to compress files in ASP.Net using VB.Net without any third party solution?
|
|
|
|
|
You can't in 1.1 as far as I know. But there is a namespace that contains classes for working with ZIP files in 2.0
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hello,
I would like some help. i have implemented a print button into a webpage, but it prints the total page, and i am looking for printer the content that is in the disclaimer box. can anyone help me on how to create this?
Thanks,
|
|
|
|
|
you can put the portion of code in div which is to be print and then onclick of the print button call a javascript function which will get the div and will print it.
|
|
|
|
|
Learning as I go and having trouble with a datagrid. Using images, and need to delete a selected record if the image is pushed or send to another page if it's edit. No errors, but don't think things are getting passed. Trying to plagarize from a help article on the web and haven't got something just right. Any help, please?
Private Sub dgCourseListItemCommand(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
if e.CommandName="Edit" then
'do a redirect with e.item.cells(0).text as url parameter
'url=http://www.servername.com/adminEcoursePageEdit.aspx?pageID= &
e.item.cells(0).text
End if
if e.CommandName="Delete" then
Dim cmdp as new sqlClient.SqlCommand("sp_eCoursePageDel",cn)
cmdp.CommandType = CommandType.StoredProcedure
Dim p_pg as SQLParameter = new SQLParameter("@pageID", SqlDbType.Int, 4)
p_pg.Value = e.item.cells(0).text
cmdp.Parameters.Add(p_pg)
cmdp.ExecuteNonQuery()
lblMsg.text=e.commandName & ", " & e.item.cells(0).text
End if
End Sub
<asp:DataGrid id="dgCourseList" OnItemCommand="dgCourseListItemCommand"
runat="server" autogenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="pageID_pk" Visible="False"></asp:BoundColumn>
<asp:boundcolumn HeaderText="Navigation Title" DataField="navTitle"
Visible="True"></asp:boundcolumn>
<ASP:TemplateColumn HeaderText="Action">
<ItemTemplate>
<ASP:ImageButton id="btnDel" Runat="server" AlternateText="Delete"
ImageUrl="../images/boxX.gif" CommandArgument='<%#
DataBinder.Eval(Container,"DataItem.pageID_pk")%>' CommandName="Delete" />
<ASP:ImageButton id="btnEdit" Runat="server" AlternateText="Edit"
ImageUrl="../images/boxCheck.gif" CommandArgument='<%#
DataBinder.Eval(Container,"DataItem.pageID_pk")%>' CommandName="Edit" />
</ItemTemplate>
</ASP:TemplateColumn>
</Columns>
</asp:DataGrid>
|
|
|
|
|
Hi there,
Why do you think it's not working? Doesn't the selecteded row get updated/deleted? Also, for the Edit button, because you only redirect the user to another page, you may consider using the HyperLink control instead of the ImageButton .
|
|
|
|
|
The item is not deleted, and when I try to write the commandName or the value of e in the datagridarguments into a label, nothing is displayed. I don't think the sub is being called. So, I then set the above label to say "to delete", but when I click the image button, nothing is displayed.
Like I said, I'm learning, so I couldn't figure out how to put mulitple images into a column using the hyperlink control and I'd prefer being able to use an update(redirect) and delete button image. Should be possible?
|
|
|
|