|
i have set autogenerate=true of gridview ,i have a
column in gridview having checkboxes ,when i check one of the checkbox , gridview disappear .
I have bind my gridview in
if(!ispostback)
{
}
the datatype of column in datasource is TINYINT(1) that is converted to checkbox column.these checkbox
were disabled ,i enabled these in rowdataboundevent of gridview to get user feed back
|
|
|
|
|
If you don't bind on postback then I'd be checking to make sure that the viewstate is not turned off for the page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yes ,resolved thank you sir
|
|
|
|
|
I am working on this application(asp.net 1.1,sql server 2000) that has a huge database , in the frontend there is a provision
to generate a csv file by running a stored procedure which can fetch 50000 records(approx), to acieve this I've used the
following:-
1) running forloop iterating through the dataset and creating a comma separated string, then creating the csv file, but this
process slows down the server immensely when data fetched is huge.
2) DTS packages is failing, because when I am creating a new package and click the defeine column button, the SQL Enterprise
manager just closes itself after a few seconds.
3) BCP command, sometimes works sometimes does not. The code used for running bcp in C# is :-
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "bcp";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.Arguments = @"""exec ETH11.dbo.usp_DownloadInvoiceforDalkia "" queryout ""D:\NewLookLogs\Invoice.csv"" -c -t ,
-T -S";
proc.StartInfo.Arguments = proc.StartInfo.Arguments.Replace("usp_DownloadInvoiceforDalkia ","usp_DownloadInvoiceforDalkia
"+"'"+xSupplierID+"',"+"'"+xBuyerID+"',"+"'"+xFromDate+"',"+"'"+xToDate+"',"+"'"+xType+"',"+""+xCurrentOnly+","+""+xDateType+
","+""+xStatus+","+""+xAllStatus+","+""+xContentType+","+"'invoice.csv',"+"'"+Session.SessionID+"'");
proc.Start();
proc.WaitForExit();
|
|
|
|
|
I am developing an web site where i have feedback form where i am getting information from user like (Email address ,Subject, And Comment )after this on button click i want to send mail to owner of the web site. so i write code :
Dim mail As New MailMessage("txtfrom.text", "webowner@mail.com", "Txtsub.text", "txtcoment.text")
Dim smtp As New SmtpClient("localhost", 1161)
smtp.Send(mail)
When i am testing this by running from from visual studio 2005 i get error "Failure sending mail" at smtp.Send(mail).
can any one tell me what i should do .
|
|
|
|
|
do you've smtp configured? I don't think so.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
No I haven't
will you please tell me how to do it .
|
|
|
|
|
I googled and now i had setup smtp.
and also chnage the code little bit
here it is:
Dim mail As New MailMessage("from@mail.com", "to@mail.com", "subject", "body")
Dim smtp As New SmtpClient("127.0.0.1", 25)
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
smtp.Send(mail)
Now here is no error
mail send sucessfully .
but when i check the mail inbox there is no mail recevied from this code , not even in spam folder .
|
|
|
|
|
|
thanks for help.
i tried that to but the problem is where ever i m sending mail it comes from the user name that we use as google credential.
but i have a feedback form where i am taking email address from user and i want that email address as a from email. so that my web master can directly hit reply button when he received mail for further transactions.
|
|
|
|
|
thats not possible with any third party smtp
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
I have one field of Gridview populated from a DB (MS SQL Server) this way:
One field is (for example) http://google.com
<asp:TemplateField HeaderText="Link"
SortExpression="Link">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "URL") %>' DataNavigateUrlFields="URL" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "URL") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="URL" runat="server"
Text='<%#Bind("URL") %>'>
</asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="URL" runat="server" width="65px">
</asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
The problem is, when I click the http://google.com field, I go to http://google.com%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20\%20%20%20%20%20%20%20%20%20%20(...)
20 is the ID of the field..
What am I doing wrong ?
|
|
|
|
|
Your html seems ok. %20 means url encoded space. Did you check the values in database? Is there any empty space in url?
|
|
|
|
|
Well, the field in the table of DB is char(100).. (MS SQL Server 2005)
Maybe if I use VARCHAR I solve the problem? Not with my pc right now to test.
|
|
|
|
|
Trim the results... removes leading and trailing spaces .
|
|
|
|
|
I honestly didnt understood what you just said about trimming the results but tomorrow I will try changing type of variable on DB and see if it solve the problem..
|
|
|
|
|
When you select the value from the database, use the TRIM() function to remove leading and trailing spaces.
In SQL Server, this is ltrim(rtrim(FIELDNAME))
|
|
|
|
|
That's exactly what I said...
Using VARCHAR everything works fine!
So many time wasted...
Thanks for your help!
|
|
|
|
|
hi
Try using this way this is working for me..
asp:HyperLinkField HeaderText ="Select Patient" DataNavigateUrlFields="patientId,maxAdmissionNo" DataTextField ="patientId" DataNavigateUrlFormatString ="ScheduleAppointment.aspx?&adMissionNo={1}&Patient_Id={0}" ItemStyle-HorizontalAlign ="Center" HeaderStyle-BackColor="#888888" HeaderStyle-ForeColor="white"/>
|
|
|
|
|
Hello, I am creating a asp.net (2.0) form which has about 40 fields. For each one of these fields, I'm required to have a small imagebutton which when clicked opens a pop-up window with a heading and help text that are picked up from the config file. I solicit your suggestion to implement this in an efficient and easy way.
Thanks for your help
|
|
|
|
|
Create an aspx page for your help page. When you call it, pass it some kind of querystring parameter to identify the help item you want. In the page load function, check the parameter and display the correct text on the form as per the value of the parameter.
|
|
|
|
|
link the image using the href tag
|
|
|
|
|
You can simply do it with javascript. Jquery have some plugins for tool tip help. To use the help text in javascript, you need some server side code to inject help text from config file to page.
|
|
|
|
|
Hi Guys,
I have a applet that runs with no issue in asp.net web application ...
Now we are migrating it to ASP.MVC application ..here applet is not working throwing class not foind exception
please let me know if anyone could able to run applet in MVC application .. below is the code from view
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.6.0/jinstall-6u11-windows-i586.cab#Version=6,0,0,11"
id="DeviceControl">
<param name="java_arguments" value="-Xmx256m" />
<param name="CODE" value="/com/XYZ/application/main/SomeApplet.class" />
<param name="archive" value="all jar path" />
<param name="type" value="application/x-java-applet;version=1.6" />
<param name="scriptable" value="true" />
<param name="mayscript" value="true" />
</object>
exception that i am gettting is
load: class com.SomeApp.scanner.main.ScannerApplet.class not found.
java.lang.ClassNotFoundException: com.XYZ.application.main.SomeApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:3213/Appname/com/XYZ/application/main/SomeApplet/class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
modified on Tuesday, November 10, 2009 6:09 PM
|
|
|
|
|
Your applet has nothing to do with ASP.NET, you're embedding it with the same HTML you'd use if this was PHP. I'd say the class is missing, and that MVC has noting to do with it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|