|
Hi all,
I would like to share with u all a problem which I am facing at the moment.I am using a gridview which I am populating using an sqldataadapter(through code and not statically).Now What I need to do is to change one of the columns into hyperlink.For instance the one we have in emails.When I click on the different hyperlinks within the same column I should be redirected to a common page but with different values through query string.For this I am trying to create an array of hyperlinks.But I am getting problem while initializing it.I am doing something like this---
dim hf() as hyperlink=???
while i<gridview1.rows.count>
hf(i).navigateurl="....?value="+i.tostring
hf(i).text=......
gridview1.rows(i).cells(0).controls(0).add(hf(i))
end while
</gridview1.rows.count>
But I am facing problem in the first line that is the initialization part.Please help me out with this.
|
|
|
|
|
Try this...
Dim hf As HyperLink() = New HyperLink(100) {}
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Hi Gaurav,
I tried it,but it is showing me the same error
"Object reference not set to an instance of an object!"
I dont know what to do.I have a deadline to meet.Going crazy.Plz help me out !!
|
|
|
|
|
Hello.. i want to get the data into my Excel Sheet from SqlServer programatically in my ASP.NET Application when i click the button ..plz tell me how can i do this
|
|
|
|
|
Use grid object and Response.ContentType = "application/vnd.ms-excel".....
I think it is enough for you...
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Connect to sql server, select the data, insert it into the spreadsheet (probably using an odbc connection)
Google for ado.net to get further information.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi,
How can I enable Wordwrapping feature for alabel control. My Label control is populated from the d database. It returs a very lenghty text. So it breaks the page layout. can any one help me??
Surya Nair
|
|
|
|
|
put your label control inside a panel control.
Set the Wrap property of Panel as TRUE
Apurv
A man is but the product of his thoughts. What he thinks, he becomes.
.......Mahatma Gandhi
Be the change you want to see in the world.
.......Mahatma Gandhi
|
|
|
|
|
It is not working...same problem happens
My Code :
<asp:Panel ID="Panel1" runat="server" Wrap="true">
<asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>' Width="100%"></asp:Label>
</asp:Panel>
Surya Nair
|
|
|
|
|
try setting the style as ...
style="text-align:justify;"
apply this style to a htmltable
Apurv
A man is but the product of his thoughts. What he thinks, he becomes.
.......Mahatma Gandhi
Be the change you want to see in the world.
.......Mahatma Gandhi
|
|
|
|
|
I used the following in my VB code of my asp.net web app:
Label1.Text = Replace(MessageText, vbNewLine, <br>)
MessageText is, of course, my label text which may or may not contain newlines.
|
|
|
|
|
Hi all,
how to develop Kiosk applications in Asp.net?
Thanks inadvance........
Surender M
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
Hi ,
There is nothing specific for Kiosk applications and they are normal applications .Only difference you can say is GUI and specially the options need to pressed is much bigger then normal apps and you need tocuh screen moniters to run that.
Puneet
|
|
|
|
|
Member 1021252 wrote: and you need tocuh screen moniters to run that.
Really? That's the definition of a Kiosk?
|
|
|
|
|
Hi,
I need to insert a string variable with '(single quotations)into the sql server 2005 database. I tried to insert it in the normal method. But I am getting an error while inserting it. For example
string str="Hi 'Please help me' programers";
SqlCommand cmd1 = new SqlCommand("INSERT into Table1(Message) values('"+str+"')",con);
I have to insert the exact string without any modifications into the database. Please if anyone know solution please help me.
Thank you.
|
|
|
|
|
Use double single quote in place of one single quote
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Try this
SqlCommand sqlCmd = new SqlCommand("INSERT into Table1(Message) values @str ", dbConn);
sqlCmd.Parameters.AddWithValue("@str", str);
|
|
|
|
|
I think sumit's answer is the best one...
using SqlParameters will remove the possibility of sql injection as well.
|
|
|
|
|
you can use some other symbol and replace it at time of rendering the value for that.
For example before inserting replace with say # and while rendering change it back to '
Hope this helps
Puneet
|
|
|
|
|
string _scriptCloseDialog = "<script>alert('Lead ID should be 9 digit long');</script>";
ClientScript.RegisterStartupScript(GetType(), "_load", _scriptCloseDialog);
I want to add Yes No Buttons in this MessageBox...Please help....
Thanks...
|
|
|
|
|
use confirm dialog in place of alert...
The miracle is this--the more we share, the more we have.
|
|
|
|
|
string _scriptCloseDialog = "<script>confirm('Are you sure');</script>";
ClientScript.RegisterStartupScript(GetType(), "_load", _scriptCloseDialog);
I want to compare this messagebox value...how to campare?
|
|
|
|
|
if (confirm("Are you sure you want to delete the custom search?")==true)
return true;
else
return false;
The miracle is this--the more we share, the more we have.
|
|
|
|
|
I am new for this JavaScript code...
I am writing code in .CS file...
There I want to compare MessageBox Value...
string _scriptCloseDialog = "<script>confirm('Are you sure you want to delete?');</script>";
ClientScript.RegisterStartupScript(GetType(), "_load", _scriptCloseDialog);
can i compare this line of code?
ClientScript.RegisterStartupScript(GetType(), "_load", _scriptCloseDialog);
Please advise..
|
|
|
|
|
Hai,
i used an file upload and image button in my aspx page, i give two image paths for save and update(\images\save.gif and \images\update.gif) , i want the checkin in javascript path of image button is \images\save.gif then one alert otherwise another? how please help me?(asp.net,c#),first i used the button for save and update,at that time in javasript i used the code is
if(document.getelementbyid("ct100..._btnave").value=0)
{
if(document.getelementbyid("ct100..._fileimage").value.length==0)
{
alert("icon field cant be empty")
}
}
at that time,working is correct after that i changed button to image button? text property is not in image button,but i ysed two image url for save and update?how to writ this code image button instead of button?
modified on Thursday, March 5, 2009 10:50 PM
|
|
|
|