|
Hi, is there anybody can tell me how to convert the doc format to tiff format in asp.net?
|
|
|
|
|
Have you tried a google search to turn up anything useful?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
i used this code, but not received any SMS
Pealse any body solve my problem
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace SmsTest
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
txtCountryCode.Enabled = false;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
protected void Send_Click(object sender, System.EventArgs e)
{
try
{
SmsTest.net.webservicex.www.SendSMS smsIndia= new SmsTest.net.webservicex.www.SendSMS();
SmsTest.com.webservicex.www.SendSMSWorld smsWorld = new SmsTest.com.webservicex.www.SendSMSWorld();
if(rdoType.SelectedValue == "1")
smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(), txtEmailId.Text.Trim(), txtMessage.Text);
else
smsWorld.sendSMS(txtEmailId.Text.Trim(), txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(), txtMessage.Text);
lblMessage.Visible = true;
lblMessage.Text="Message Send Succesfully";
}
catch(Exception ex)
{
lblMessage.Visible = true;
lblMessage.Text="Error in Sending message"+ex.ToString();
}
}
protected void rdoType_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(rdoType.SelectedValue =="1")
txtCountryCode.Enabled = false;
else
txtCountryCode.Enabled = false;
}
}
}
|
|
|
|
|
Hi
I have the following code:
for (int x = 0; x < GridView1.Rows.Count; x++)
{
dropdown.SelectedItem.Selected = false;
Session["default"] = GridView1.DataKeys[x].Values[2].ToString().Trim();
string default = Session["default"].ToString().Trim();
dropdown.Items.FindByValue(default).Selected = true;
}
What it should do is find the value in the session default and then set the dropdown to that value.
However it only seems to be doing it to the last row instead of all of them
why would this be?
cheers!
|
|
|
|
|
.netman wrote: doing it to the last row instead of all of them
.netman wrote: dropdown.SelectedItem.Selected = false;
Session["default"] = GridView1.DataKeys[x].Values[2].ToString().Trim();
string default = Session["default"].ToString().Trim();
dropdown.Items.FindByValue(default).Selected = true;
dropdown.SelectedValue=GridView1.DataKeys[x].Values[2].ToString().Trim();
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Nope thats not working either.
Basically Ive got a gridview with say 9 rows in
each row has an order of what it would be so the order column should look like this
order
1
2
3
4
5
6
7
8
9
but its not, after adding your line of code it is now displaying 1 in all the dropdowns except the last one which is 9.
Why would this be?
thnaks!
|
|
|
|
|
Got it
You must find the dropdown to set the value.
Hop this will help!
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Excellent that was exactly it, thankyou!!
|
|
|
|
|
i receive this error what is this error
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
[No relevant source lines]
Source File: App_Web_1lwzeoop.0.cs Line: 0
Stack Trace:
[SecurityException: Request failed.]
_Default.Button1_Click(Object sender, EventArgs e) +0
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_1lwzeoop.0.cs
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
|
|
|
|
Generally, this error is thrown when the trust level of an applicaiton is set to medium.
You may use web.config to edit the trust parameter (make it "Full") and then everything should be working.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I would like to dynamically change an asp.net web page. This should be done only by an admin and the change should be permanent. I've found alot of tutorials on how to add controls to the same web page, but this was done by everyone and the change was done for the same session and not saved for the next.
|
|
|
|
|
Hi guys how to send multiple attachment files in mail?,
I dont like to assign how many files user can upload...,
In runtime he can upload multiple files
Like Gmail............,
After that have to send mail...,
Plz i searched in net but they fixed for uploading files...,
I want to load multiple files on runtime...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Here is a very simple to do it:
SmtpClient client1 = new SmtpClient("smtpserver", 25);
MailMessage msg = new MailMessage();
msg.To.Add(new MailAddress("toemailaddress"));
msg.From = new MailAddress("fromEmailAddress");
msg.Subject = "Test Message";
msg.Body = "Test Mail with Attachments";
Attachment item = new Attachment("D:\\test.txt");
Attachment item1 = new Attachment("D:\\test2.txt");
msg.Attachments.Add(item);
msg.Attachments.Add(item1);
client1.Send(msg);
Response.Write("Send");
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hi All,
I am using basepage in my ASP.Net code but in base page I am not getting session.
My code is as follows:
public class DD_AdmBasePage : System.Web.UI.Page
{
public string LoginUser;
public DD_AdmBasePage()
{
LoginCheck();
}
protected void LoginCheck()
{
if (HttpContext.Current.Session["LoginUser"]!=null)
{
LoginUser= HttpContext.Current.Session["LoginUser"].ToString();
}
else
{
HttpContext.Current.Response.Redirect("~/login.aspx");
}
}
}
please help me, I am getting error in following line:
if (HttpContext.Current.Session["LoginUser"]!=null)
error: object reference not set to an Insatance.
and when i am checking HttpContext.Current.Session, it is showing that it is null. I cant understand why it is null.
Please help me.
Thanks in advance
DAsh04
|
|
|
|
|
ash04 wrote: and when i am checking HttpContext.Current.Session, it is showing that it is null. I cant understand why it is null.
Because you base page has stopped calling "OnInit" on it's base page which is "System.Web.UI.Page". So always override it
public class DD_AdmBasePage : System.Web.UI.Page
{
public string LoginUser;
public DD_AdmBasePage()
{
LoginCheck();
}
protected void LoginCheck()
{
if (HttpContext.Current.Session["LoginUser"]!=null)
LoginUser= HttpContext.Current.Session["LoginUser"].ToString();
else
HttpContext.Current.Response.Redirect("~/login.aspx");
}
protected override void OnInit(EventArgs e) {
base.OnInit(e);
}
}
|
|
|
|
|
thanks navaneeth for participating, I tried but it is not solved my problem. When I checked i found :
protected override void OnInit(EventArgs e)
{ base.OnInit(e); }
this function is not called.
DAsh04
|
|
|
|
|
ash04 wrote: this function is not called.
Then you are doing something wrong. See the ASP.NET page life cycle[^] and "Init" is called at the beginning. Can you post the whole base class code ?
|
|
|
|
|
My full base page code
namespace DD
{
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.SessionState;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for DWPage
/// </summary>
public class DD_AdmBasePage : System.Web.UI.Page
{
private string LoginUser="" ;
public DD_AdmBasePage()
{
LoginCheck();
}
protected string PageName
{
get { return HttpContext.Current.Request.Url.Segments[HttpContext.Current.Request.Url.Segments.Length-1]; }
}
public string LoggedInUser
{
get { return LoginUser; }
}
protected void CheckLogin()
{
if (HttpContext.Current.Session["LoginUser"]!=null)
{
LoginUser= HttpContext.Current.Session["LoginUser"].ToString();
}
else
{
HttpContext.Current.Response.Redirect("~/login.aspx");
}
}
protected override void OnInit(EventArgs e)
{ base.OnInit(e); }
}
}
DAsh04
|
|
|
|
|
Can you show your derived Page ?
Are you using OnInit event in that page?
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
|
|
|
|
|
yes it is like this:
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
}
#endregion
DAsh04
|
|
|
|
|
Seems to be tricky. Can't guess from this also
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
Check this
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
|
|
|
|
|
Hi all,
can any1 please help...im getting an error "expected '}'" in my javascript here is my function and were i call it
event:
OnClientMouseOver="javascript:MyFunction()"
function:
function MyFunction()
{
document.getElementById("<%=radpnlBarItems.ClientID%>").style.color = "#000066";
}
plz help, thanks in advance
living life on the flip side
|
|
|
|
|
it is may be because value of the code :
radpnlBarItems.ClientID is not comming properly.
DAsh04
|
|
|
|
|
thanks but how will i sort it out?
living life on the flip side
|
|
|
|
|
use it
function MyFunction()
{
alert(<%=radpnlBarItems.ClientID%> );
//document.getElementById("<%=radpnlBarItems.ClientID%>;").style.color = "#000066";
}
DAsh04
|
|
|
|