|
HtmlGenericControl[] objLi = {new HtmlGenericControl(),new HtmlGenericControl(),new HtmlGenericControl(), new HtmlGenericControl(), new HtmlGenericControl()}:
objLi[0].InnerHtml = "First element";
objLi[1].InnerHtml = "Second Element";
modified on Wednesday, December 19, 2007 7:32:47 AM
|
|
|
|
|
except that will fail with Null reference exception as you have not instantiated objLi[0] or objLi[1]
HtmlGenericControl[] objLi = new HtmlGenericControl[5];<br />
objLi[0] = new HtmlGenericControl();<br />
objLi[0].InnerHtml = "First element";<br />
objLi[1] = new HtmlGenericControl();<br />
objLi[1].InnerHtml = "Second Element";
|
|
|
|
|
exactly. I was on a mobile. So became lazy to type !
|
|
|
|
|
Hi,
If the Textbox value is empty then, when i click "Ok" button an alert should display as "Please Enter the value for textbox" and simultaneously i have to display an "*"(Asteristic) only if the textbox is empty. Otherwise don't display.
Please help me..
if(document.getElementById('txtbox').value=="")
{
alert('Enter text value');
return false;
}
-------
<asp:textbox id="txtTickInfo" runat="server"></asp:textbox>
<asp:label id="Asteristic" runat="server" forecolor="Red" text="*" visible="false"></asp:label>
<div class="ForumMod">modified on Wednesday, December 19, 2007 7:04:52 AM</div>
|
|
|
|
|
So what's the problem here ? Why don't you use validation control ?
|
|
|
|
|
yes here i used validation as below you see
if(document.getElementById('txtvalue').value=="")
{
alert('Entertext value');
document.getElementById('Asteristic').style.display="inline";
return false;
}
but it says "Object required".
How can i display the "*"(label control) only if the textbox is null?
|
|
|
|
|
PeriyasamyRamachandran wrote: if(document.getElementById('txtvalue').value=="")
I guess your textbox name is txtTickInfo. Check that
|
|
|
|
|
Your textbox id is txtTickInfo, not txtbox.
|
|
|
|
|
|
How to implement the nodes and child nodes in the treeview in asp.net 2.0 version
VanithaVasu
|
|
|
|
|
Hi all
I am editing a datalist and i am trying to upload file from that editing file
my code
------------
Dim WriterID As String = DirectCast(e.Item.FindControl("WriterID"), Label).Text
Dim Writer As String = DirectCast(e.Item.FindControl("Writer"), TextBox).Text
Dim ImageFileName As String = DirectCast(e.Item.FindControl("ImageFileName"), TextBox).Text
But the upfile (HtmlInputFile) control is not finding giving error
'System.NullReferenceException: Object reference not set to an instance of an object.
'
Dim upfile As HtmlInputFile = DirectCast(e.Item.FindControl("upfile"), System.Web.UI.HtmlControls.HtmlInputFile)
How can i found HtmlInputFile in my datalist control
ThanQ
Keerthi
|
|
|
|
|
Hi Friends,
Can any one tell me the validation expression for alphabets and numbers.
Thanks & Regards
Senthil Kumar
|
|
|
|
|
<asp:RegularExpressionValidator ID="Reg" runat="server" ValidationExpression="^^[0-9/A-Z a-z]{1,20}$"
Display="Dynamic" ErrorMessage=" * Enter Proper Data" ControlToValidate="textbox1">
</asp:RegularExpressionValidator>
|
|
|
|
|
Dear Friends,
i want to provide download functionality in my website, can any one provide me any link or help for this functionality, so i will provide it in improved manner.
for reference,
I am using Visual Studio 2005 (.Net Framework 2.0)
IIS (5.0)
Thanks in advanced
Sasmi
|
|
|
|
|
What sort of control are you expecting ? Usually a website just streams the file down as a download.
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 )
|
|
|
|
|
|
Sasmi wrote: i want to provide download functionality in my website
What is big there in implementing download functionality ? Provide a link to the file, and download will be managed by browser.
|
|
|
|
|
Hi i am uploading one word doc to my server,
Suppose if i like to delete that doc,
its possible from client side?,
Plz i need some ideas or suggesstion abt that,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
HMagesh wrote: its possible from client side?,
You mean, deleting this word doc by using Client-side script? then, the answer is NO. You should write the server-side code to delete that file.
|
|
|
|
|
no need of client script only...,
if server side code also how u can say to delete a particular file ?,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
|
Yeah. What Paddy Boyd said is right. Write "
File.Delete(filePath); " in Button Click. If the user click this button which is located on the page which is shown in the browser, this code will be executed and will delete the file.
|
|
|
|
|
Hi,
to do the same you must have rights to delete that file.
(Rights to client to delete file).
Then you can delete that file.
Its easy to delete the file from server.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
I'm not sure the question is clear. If the file is on the server, you can delete it on the server. The client can be offered a button by which they trigger the server side code to delete it. If the file is on the client, you cannot delete it.
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 )
|
|
|
|
|
Hai All
How can i call a javascript function for the dynamically created treeview child onclick event. Please help me.
|
|
|
|